mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 990740 - Make eyedropper movement smoother. r=fitzgen
This commit is contained in:
parent
8d5596e4bc
commit
565a34e98e
@ -115,6 +115,8 @@ function Eyedropper(chromeWindow, opts = { copyOnSelect: true }) {
|
||||
this._dragging = true;
|
||||
this.loaded = false;
|
||||
|
||||
this._mouseMoveCounter = 0;
|
||||
|
||||
this.format = Services.prefs.getCharPref(FORMAT_PREF); // color value format
|
||||
this.zoom = Services.prefs.getIntPref(ZOOM_PREF); // zoom level - integer
|
||||
|
||||
@ -378,6 +380,11 @@ Eyedropper.prototype = {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._OS == "Linux" && ++this._mouseMoveCounter % 2 == 0) {
|
||||
// skip every other mousemove to preserve performance.
|
||||
return;
|
||||
}
|
||||
|
||||
this._setCoordinates(event);
|
||||
this._drawWindow();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user