overview: Expose scroll-events
Using the scroll wheel in the window picker should switch workspaces. As the picker doesn't have a visible boundary though, it makes sense to accept scroll-event for the entire overview area. Rather than making the overview's main actor public, expose scroll-events via a signal. https://bugzilla.gnome.org/show_bug.cgi?id=686639
This commit is contained in:
parent
0e12215614
commit
c495ff8ad8
@ -125,6 +125,7 @@ const Overview = new Lang.Class({
|
||||
this._overview._delegate = this;
|
||||
|
||||
this._group = new St.BoxLayout({ name: 'overview-group',
|
||||
reactive: true,
|
||||
clip_to_allocation: true });
|
||||
|
||||
this._backgroundGroup = new Meta.BackgroundGroup();
|
||||
@ -164,6 +165,7 @@ const Overview = new Lang.Class({
|
||||
Main.xdndHandler.connect('drag-end', Lang.bind(this, this._onDragEnd));
|
||||
|
||||
global.screen.connect('restacked', Lang.bind(this, this._onRestacked));
|
||||
this._group.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
|
||||
|
||||
this._windowSwitchTimeoutId = 0;
|
||||
this._windowSwitchTimestamp = 0;
|
||||
@ -379,6 +381,10 @@ const Overview = new Lang.Class({
|
||||
return DND.DragMotionResult.CONTINUE;
|
||||
},
|
||||
|
||||
_onScrollEvent: function(actor, event) {
|
||||
this.emit('scroll-event', event);
|
||||
},
|
||||
|
||||
addAction: function(action) {
|
||||
if (this.isDummy)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user