Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

window-list applet: prevent mouse-wheel scroll from grabbing windows from other workspaces #1152

Merged
merged 1 commit into from

3 participants

@mtwebster
Collaborator

Fixes #1150

@imarkskinner

I'm also noticing this issue, to replicate it:

  1. In Cinnamon settings > Windows, select "Enable mouse-wheel scrolling in Window List applet"
  2. Move some open windows across multiple workspaces
  3. Use the mouse wheel on the window list applet

Notice how all of your windows from various workspaces get forcibly moved into one workspace

@clefebvre clefebvre merged commit 111160d into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 18, 2012
  1. @mtwebster
This page is out of date. Refresh to see the latest.
View
12 files/usr/share/cinnamon/applets/window-list@cinnamon.org/applet.js
@@ -354,9 +354,15 @@ AppMenuButton.prototype = {
_onScrollEvent: function(actor, event) {
let direction = event.get_scroll_direction();
let current;
- let num_windows = this.window_list.length;
+ let vis_windows = new Array();
+ for (let i = 0; i < this.window_list.length; i++) {
+ if (this.window_list[i].actor.visible) {
+ vis_windows.push(i);
+ }
+ }
+ let num_windows = vis_windows.length;
for (let i = 0; i < num_windows; i++) {
- if (this.window_list[i].metaWindow.has_focus()) {
+ if (this.window_list[vis_windows[i]].metaWindow.has_focus()) {
current = i;
break;
}
@@ -368,7 +374,7 @@ AppMenuButton.prototype = {
if (direction == 0) {
target = ((current + 1) <= num_windows - 1) ? (current + 1) : 0;
}
- this.window_list[target].metaWindow.activate(global.get_current_time());
+ this.window_list[vis_windows[target]].metaWindow.activate(global.get_current_time());
},
_onDragBegin: function() {
Something went wrong with that request. Please try again.