Overview: use a normal chrome actor to handle events during XDND

Instead of using the input mode, when the overview is not modal
it should use a Chrome-tracked actor, that is added to the input
region. Because the overview always takes pointer input when
visible, the actor is added at startup, and it is shown and hidden
as needed.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
This commit is contained in:
Giovanni Campagna
2013-05-22 18:05:24 +02:00
parent a259016436
commit f0113c5ff5
2 changed files with 22 additions and 28 deletions

View File

@ -189,11 +189,13 @@ const LayoutManager = new Lang.Class({
this.uiGroup.add_actor(global.window_group);
global.stage.remove_actor(global.overlay_group);
this.overviewGroup = new St.Widget({ name: 'overviewGroup' });
this.uiGroup.add_actor(this.overviewGroup);
global.stage.add_child(this.uiGroup);
this.overviewGroup = new St.Widget({ name: 'overviewGroup',
visible: false });
this.addChrome(this.overviewGroup);
this.screenShieldGroup = new St.Widget({ name: 'screenShieldGroup',
visible: false,
clip_to_allocation: true,
@ -244,24 +246,24 @@ const LayoutManager = new Lang.Class({
this._monitorsChanged();
},
// This is called by Main after everything else is constructed;
// it needs access to Main.overview, which didn't exist
// yet when the LayoutManager was constructed.
// This is called by Main after everything else is constructed
init: function() {
Main.overview.connect('showing', Lang.bind(this, this._overviewShowing));
Main.overview.connect('hidden', Lang.bind(this, this._overviewHidden));
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
this._prepareStartupAnimation();
},
_overviewShowing: function() {
showOverview: function() {
this.overviewGroup.show();
this._inOverview = true;
this._updateVisibility();
this._queueUpdateRegions();
},
_overviewHidden: function() {
hideOverview: function() {
this.overviewGroup.hide();
this._inOverview = false;
this._updateVisibility();
this._queueUpdateRegions();