Untitled


SUBMITTED BY: trior

DATE: March 17, 2018, 3:06 a.m.

FORMAT: Text only

SIZE: 2.7 kB

HITS: 965

  1. --- appIcons.js 2018-02-27 14:14:00.000000000 +0000
  2. +++ appIcons_new.js 2018-03-15 04:38:25.528002000 +0000
  3. @@ -191,11 +191,61 @@
  4. this.forcedOverview = false;
  5. + this._dtpSettings.connect('changed::scroll-action', Lang.bind(this, function() {
  6. + this._optionalScrollCycleWindows();
  7. + }));
  8. + this._optionalScrollCycleWindows();
  9. +
  10. this._numberOverlay();
  11. this._signalsHandler = new Convenience.GlobalSignalsHandler();
  12. },
  13. + _optionalScrollCycleWindows: function() {
  14. +
  15. + if (this._scrollEventHandler) {
  16. + this.actor.disconnect(this._scrollEventHandler);
  17. + this._scrollEventHandler = 0;
  18. + }
  19. + this._scrollEventHandler = this.actor.connect('scroll-event', Lang.bind(this,
  20. + this.onScrollEvent));
  21. + },
  22. +
  23. + onScrollEvent: function(actor, event) {
  24. +
  25. + let focusedApp = tracker.focus_app;
  26. +
  27. + let direction = null;
  28. +
  29. + switch (event.get_scroll_direction()) {
  30. + case Clutter.ScrollDirection.UP:
  31. + direction = Meta.MotionDirection.UP;
  32. + break;
  33. + case Clutter.ScrollDirection.DOWN:
  34. + direction = Meta.MotionDirection.DOWN;
  35. + break;
  36. + case Clutter.ScrollDirection.SMOOTH:
  37. + let [dx, dy] = event.get_scroll_delta();
  38. + if (dy < 0)
  39. + direction = Meta.MotionDirection.UP;
  40. + else if (dy > 0)
  41. + direction = Meta.MotionDirection.DOWN;
  42. + break;
  43. + }
  44. +
  45. + if (!Main.overview._shown) {
  46. + let reversed = direction === Meta.MotionDirection.UP;
  47. + if (this.app == focusedApp)
  48. + cycleThroughWindows(this.app, this._dtpSettings, reversed, true);
  49. + else {
  50. + activateFirstWindow(this.app, this._dtpSettings);
  51. + }
  52. + }
  53. + else
  54. + this.app.activate();
  55. + return true;
  56. + },
  57. +
  58. _createWindowPreview: function() {
  59. // Abort if already activated
  60. if (this.menuManagerWindowPreview)
  61. @@ -1106,10 +1156,10 @@
  62. recentlyClickedAppIndex++;
  63. }
  64. let index = recentlyClickedAppIndex % recentlyClickedAppWindows.length;
  65. -
  66. - if(recentlyClickedAppWindows[index] === "MINIMIZE")
  67. + //The commented code give errors in windows viewing order but without it we get a non-blocking error.
  68. + /*if(recentlyClickedAppWindows[index] === "MINIMIZE")
  69. minimizeWindow(app, true, settings);
  70. - else
  71. + else*/
  72. Main.activateWindow(recentlyClickedAppWindows[index]);
  73. }

comments powered by Disqus