fs1.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From ab2ca17b766556eec7c5c47c4d75ef6ff45a31a7 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
  3. Date: Fri, 16 Oct 2015 15:36:33 +0200
  4. Subject: windowManager: Fix fullscreen animations on dualscreen
  5. The translation should describe the difference between the fullscreened
  6. and unfullscreened position of the window - however we are currently
  7. assuming a fullscreen position of (0, 0) instead of the monitor's origin,
  8. which causes glitches on dualscreen setups.
  9. https://bugzilla.gnome.org/show_bug.cgi?id=756697
  10. ---
  11. js/ui/windowManager.js | 10 ++++++----
  12. 1 file changed, 6 insertions(+), 4 deletions(-)
  13. diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
  14. index 2ee99e3..c8996d8 100644
  15. --- a/js/ui/windowManager.js
  16. +++ b/js/ui/windowManager.js
  17. @@ -1235,15 +1235,17 @@ const WindowManager = new Lang.Class({
  18. },
  19. _fullscreenWindow: function(shellwm, actor, oldFrameRect, oldBufferRect) {
  20. - actor.translation_x = oldFrameRect.x;
  21. - actor.translation_y = oldFrameRect.y;
  22. + let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
  23. + actor.translation_x = oldFrameRect.x - monitor.x;
  24. + actor.translation_y = oldFrameRect.y - monitor.y;
  25. this._fullscreenAnimation(shellwm, actor, oldFrameRect);
  26. },
  27. _unfullscreenWindow: function(shellwm, actor, oldFrameRect, oldBufferRect) {
  28. let targetRect = actor.meta_window.get_frame_rect();
  29. - actor.translation_x = -targetRect.x;
  30. - actor.translation_y = -targetRect.y;
  31. + let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
  32. + actor.translation_x = -(targetRect.x - monitor.x);
  33. + actor.translation_y = -(targetRect.y - monitor.y);
  34. this._fullscreenAnimation(shellwm, actor, oldFrameRect);
  35. },
  36. --
  37. cgit v0.11.2