WindowManager: WORKAROUND: disable dimming in the overview

Clones and effects don't mix, due to a bug in Clutter we don't
know how to fix, and sometimes the clone is clipped completely.
As a workaround, undim windows with dialogs in the overview.

Clutter bug: https://bugzilla.gnome.org/show_bug.cgi?id=659523

https://bugzilla.gnome.org/show_bug.cgi?id=650843
This commit is contained in:
Giovanni Campagna 2014-01-19 16:12:15 +01:00
parent 8b99617513
commit 3a26f7f4d5
3 changed files with 9 additions and 28 deletions

View File

@ -569,6 +569,15 @@ const WindowManager = new Lang.Class({
Shell.KeyBindingMode.TOPBAR_POPUP, Shell.KeyBindingMode.TOPBAR_POPUP,
Lang.bind(this, this._toggleAppMenu)); Lang.bind(this, this._toggleAppMenu));
Main.overview.connect('showing', Lang.bind(this, function() {
for (let i = 0; i < this._dimmedWindows.length; i++)
this._undimWindow(this._dimmedWindows[i]);
}));
Main.overview.connect('hiding', Lang.bind(this, function() {
for (let i = 0; i < this._dimmedWindows.length; i++)
this._dimWindow(this._dimmedWindows[i]);
}));
if (Main.sessionMode.hasWorkspaces) if (Main.sessionMode.hasWorkspaces)
this._workspaceTracker = new WorkspaceTracker(this); this._workspaceTracker = new WorkspaceTracker(this);

View File

@ -194,7 +194,6 @@ const WindowClone = new Lang.Class({
addAttachedDialog: function(win) { addAttachedDialog: function(win) {
this._doAddAttachedDialog(win, win.get_compositor_private()); this._doAddAttachedDialog(win, win.get_compositor_private());
this._computeBoundingBox(); this._computeBoundingBox();
this._updateDimmer();
this.emit('size-changed'); this.emit('size-changed');
}, },
@ -208,7 +207,6 @@ const WindowClone = new Lang.Class({
clone.destroy(); clone.destroy();
this._computeBoundingBox(); this._computeBoundingBox();
this._updateDimmer();
this.emit('size-changed'); this.emit('size-changed');
})); }));
this.actor.add_child(clone); this.actor.add_child(clone);
@ -228,18 +226,6 @@ const WindowClone = new Lang.Class({
return true; return true;
}); });
this.metaWindow.foreach_transient(iter); this.metaWindow.foreach_transient(iter);
this._dimmer = new WindowManager.WindowDimmer(this._windowClone);
this._updateDimmer();
},
_updateDimmer: function() {
if (this.actor.get_n_children() > 1) {
this._dimmer.setEnabled(true);
this._dimmer.dimFactor = 1.0;
} else {
this._dimmer.setEnabled(false);
}
}, },
get boundingBox() { get boundingBox() {

View File

@ -106,9 +106,6 @@ const WindowClone = new Lang.Class({
return true; return true;
}); });
this.metaWindow.foreach_transient(iter); this.metaWindow.foreach_transient(iter);
this._dimmer = new WindowManager.WindowDimmer(this.clone);
this._updateDimmer();
}, },
// Find the actor just below us, respecting reparenting done // Find the actor just below us, respecting reparenting done
@ -148,7 +145,6 @@ const WindowClone = new Lang.Class({
addAttachedDialog: function(win) { addAttachedDialog: function(win) {
this._doAddAttachedDialog(win, win.get_compositor_private()); this._doAddAttachedDialog(win, win.get_compositor_private());
this._updateDimmer();
}, },
_doAddAttachedDialog: function(metaDialog, realDialog) { _doAddAttachedDialog: function(metaDialog, realDialog) {
@ -159,20 +155,10 @@ const WindowClone = new Lang.Class({
Lang.bind(this, this._updateDialogPosition, clone)); Lang.bind(this, this._updateDialogPosition, clone));
clone._destroyId = realDialog.connect('destroy', Lang.bind(this, function() { clone._destroyId = realDialog.connect('destroy', Lang.bind(this, function() {
clone.destroy(); clone.destroy();
this._updateDimmer();
})); }));
this.actor.add_child(clone); this.actor.add_child(clone);
}, },
_updateDimmer: function() {
if (this.actor.get_n_children() > 1) {
this._dimmer.setEnabled(true);
this._dimmer.dimFactor = 1.0;
} else {
this._dimmer.setEnabled(false);
}
},
_updateDialogPosition: function(realDialog, cloneDialog) { _updateDialogPosition: function(realDialog, cloneDialog) {
let metaDialog = realDialog.meta_window; let metaDialog = realDialog.meta_window;
let dialogRect = metaDialog.get_outer_rect(); let dialogRect = metaDialog.get_outer_rect();