From c495ff8ad8a630be2c21e940f8eee6ff6aa00ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 22 Oct 2012 17:39:19 +0200 Subject: [PATCH] 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 --- js/ui/overview.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/ui/overview.js b/js/ui/overview.js index 755dfb4b2..13f348aeb 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -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;