workspaces-display: Don't slide out pager on drag-begin
Sliding out the workspaces pager when starting a drag causes a lot of motion. With the pager only hiding if workspaces are not used, it is better to require to explicitly hover the workspaces sidebar for the sliding. https://bugzilla.gnome.org/show_bug.cgi?id=652730
This commit is contained in:
parent
737f395d6c
commit
ed8acefc00
@ -855,7 +855,7 @@ WorkspacesDisplay.prototype = {
|
|||||||
if (Main.overview.animationInProgress)
|
if (Main.overview.animationInProgress)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let shouldZoom = this._alwaysZoomOut || this._controls.hover || (this._inDrag && !this._cancelledDrag);
|
let shouldZoom = this._alwaysZoomOut || this._controls.hover;
|
||||||
if (shouldZoom != this._zoomOut) {
|
if (shouldZoom != this._zoomOut) {
|
||||||
this._zoomOut = shouldZoom;
|
this._zoomOut = shouldZoom;
|
||||||
this._updateWorkspacesGeometry();
|
this._updateWorkspacesGeometry();
|
||||||
@ -879,12 +879,22 @@ WorkspacesDisplay.prototype = {
|
|||||||
_dragBegin: function() {
|
_dragBegin: function() {
|
||||||
this._inDrag = true;
|
this._inDrag = true;
|
||||||
this._cancelledDrag = false;
|
this._cancelledDrag = false;
|
||||||
this._updateZoom();
|
this._dragMonitor = {
|
||||||
|
dragMotion: Lang.bind(this, this._onDragMotion)
|
||||||
|
};
|
||||||
|
DND.addDragMonitor(this._dragMonitor);
|
||||||
},
|
},
|
||||||
|
|
||||||
_dragCancelled: function() {
|
_dragCancelled: function() {
|
||||||
this._cancelledDrag = true;
|
this._cancelledDrag = true;
|
||||||
this._updateZoom();
|
DND.removeDragMonitor(this._dragMonitor);
|
||||||
|
},
|
||||||
|
|
||||||
|
_onDragMotion: function(dragEvent) {
|
||||||
|
let controlsHovered = this._controls.contains(dragEvent.targetActor);
|
||||||
|
this._controls.set_hover(controlsHovered);
|
||||||
|
|
||||||
|
return DND.DragMotionResult.CONTINUE;
|
||||||
},
|
},
|
||||||
|
|
||||||
_dragEnd: function() {
|
_dragEnd: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user