dash: don't react to window drags
Instead, make the actor half-opaque in that case. https://bugzilla.gnome.org/show_bug.cgi?id=686984
This commit is contained in:
parent
07c0105c83
commit
cb7778d433
@ -24,9 +24,6 @@ const DASH_ITEM_HOVER_TIMEOUT = 300;
|
||||
function getAppFromSource(source) {
|
||||
if (source instanceof AppDisplay.AppWellIcon) {
|
||||
return source.app;
|
||||
} else if (source.metaWindow) {
|
||||
let tracker = Shell.WindowTracker.get_default();
|
||||
return tracker.get_window_app(source.metaWindow);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
@ -415,12 +412,6 @@ const Dash = new Lang.Class({
|
||||
Lang.bind(this, this._onDragEnd));
|
||||
Main.overview.connect('item-drag-cancelled',
|
||||
Lang.bind(this, this._onDragCancelled));
|
||||
Main.overview.connect('window-drag-begin',
|
||||
Lang.bind(this, this._onDragBegin));
|
||||
Main.overview.connect('window-drag-cancelled',
|
||||
Lang.bind(this, this._onDragCancelled));
|
||||
Main.overview.connect('window-drag-end',
|
||||
Lang.bind(this, this._onDragEnd));
|
||||
|
||||
// Translators: this is the name of the dock/favorites area on
|
||||
// the left of the overview
|
||||
|
@ -101,9 +101,10 @@ const SlidingControl = new Lang.Class({
|
||||
Main.overview.connect('item-drag-begin', Lang.bind(this, this._onDragBegin));
|
||||
Main.overview.connect('item-drag-end', Lang.bind(this, this._onDragEnd));
|
||||
Main.overview.connect('item-drag-cancelled', Lang.bind(this, this._onDragEnd));
|
||||
Main.overview.connect('window-drag-begin', Lang.bind(this, this._onDragBegin));
|
||||
Main.overview.connect('window-drag-cancelled', Lang.bind(this, this._onDragEnd));
|
||||
Main.overview.connect('window-drag-end', Lang.bind(this, this._onDragEnd));
|
||||
|
||||
Main.overview.connect('window-drag-begin', Lang.bind(this, this._onWindowDragBegin));
|
||||
Main.overview.connect('window-drag-cancelled', Lang.bind(this, this._onWindowDragEnd));
|
||||
Main.overview.connect('window-drag-end', Lang.bind(this, this._onWindowDragEnd));
|
||||
},
|
||||
|
||||
getSlide: function() {
|
||||
@ -162,6 +163,14 @@ const SlidingControl = new Lang.Class({
|
||||
this.actor.translation_x = 0;
|
||||
},
|
||||
|
||||
_onWindowDragBegin: function() {
|
||||
this._onDragBegin();
|
||||
},
|
||||
|
||||
_onWindowDragEnd: function() {
|
||||
this._onDragEnd();
|
||||
},
|
||||
|
||||
_onDragBegin: function() {
|
||||
this.inDrag = true;
|
||||
this.actor.translation_x = 0;
|
||||
@ -173,6 +182,20 @@ const SlidingControl = new Lang.Class({
|
||||
this.updateSlide();
|
||||
},
|
||||
|
||||
fadeIn: function() {
|
||||
Tweener.addTween(this.actor, { opacity: 255,
|
||||
time: SIDE_CONTROLS_ANIMATION_TIME / 2,
|
||||
transition: 'easeInQuad'
|
||||
});
|
||||
},
|
||||
|
||||
fadeHalf: function() {
|
||||
Tweener.addTween(this.actor, { opacity: 128,
|
||||
time: SIDE_CONTROLS_ANIMATION_TIME / 2,
|
||||
transition: 'easeOutQuad'
|
||||
});
|
||||
},
|
||||
|
||||
slideIn: function() {
|
||||
this.visible = true;
|
||||
// we will update slideX and the translation from pageEmpty
|
||||
@ -294,6 +317,14 @@ const DashSlider = new Lang.Class({
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
},
|
||||
|
||||
_onWindowDragBegin: function() {
|
||||
this.fadeHalf();
|
||||
},
|
||||
|
||||
_onWindowDragEnd: function() {
|
||||
this.fadeIn();
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user