Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

window-list applet: prevent mouse-wheel scroll from grabbing windows …

…from

other workspaces
  • Loading branch information...
commit eefd64ef62e5aa384a2da3cbde14ab1ae6649779 1 parent 2d336f8
Michael Webster authored
12 files/usr/share/cinnamon/applets/window-list@cinnamon.org/applet.js
@@ -354,9 +354,15 @@ AppMenuButton.prototype = {
354 354 _onScrollEvent: function(actor, event) {
355 355 let direction = event.get_scroll_direction();
356 356 let current;
357   - let num_windows = this.window_list.length;
  357 + let vis_windows = new Array();
  358 + for (let i = 0; i < this.window_list.length; i++) {
  359 + if (this.window_list[i].actor.visible) {
  360 + vis_windows.push(i);
  361 + }
  362 + }
  363 + let num_windows = vis_windows.length;
358 364 for (let i = 0; i < num_windows; i++) {
359   - if (this.window_list[i].metaWindow.has_focus()) {
  365 + if (this.window_list[vis_windows[i]].metaWindow.has_focus()) {
360 366 current = i;
361 367 break;
362 368 }
@@ -368,7 +374,7 @@ AppMenuButton.prototype = {
368 374 if (direction == 0) {
369 375 target = ((current + 1) <= num_windows - 1) ? (current + 1) : 0;
370 376 }
371   - this.window_list[target].metaWindow.activate(global.get_current_time());
  377 + this.window_list[vis_windows[target]].metaWindow.activate(global.get_current_time());
372 378 },
373 379
374 380 _onDragBegin: function() {

0 comments on commit eefd64e

Please sign in to comment.
Something went wrong with that request. Please try again.