зеркало из https://github.com/mozilla/gecko-dev.git
Bug 990740 - Make eyedropper movement smoother. r=fitzgen
This commit is contained in:
Родитель
8d5596e4bc
Коммит
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();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче