[gnome-shell] windowManager: Fix fullscreen animations on dualscreen
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] windowManager: Fix fullscreen animations on dualscreen
- Date: Fri, 16 Oct 2015 13:51:09 +0000 (UTC)
commit 1c3ea1649f76e0f8295902b10e8673ed3fc8f912
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Oct 16 15:36:33 2015 +0200
windowManager: Fix fullscreen animations on dualscreen
The translation should describe the difference between the fullscreened
and unfullscreened position of the window - however we are currently
assuming a fullscreen position of (0, 0) instead of the monitor's origin,
which causes glitches on dualscreen setups.
https://bugzilla.gnome.org/show_bug.cgi?id=756697
js/ui/windowManager.js | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 2ee99e3..c8996d8 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -1235,15 +1235,17 @@ const WindowManager = new Lang.Class({
},
_fullscreenWindow: function(shellwm, actor, oldFrameRect, oldBufferRect) {
- actor.translation_x = oldFrameRect.x;
- actor.translation_y = oldFrameRect.y;
+ let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
+ actor.translation_x = oldFrameRect.x - monitor.x;
+ actor.translation_y = oldFrameRect.y - monitor.y;
this._fullscreenAnimation(shellwm, actor, oldFrameRect);
},
_unfullscreenWindow: function(shellwm, actor, oldFrameRect, oldBufferRect) {
let targetRect = actor.meta_window.get_frame_rect();
- actor.translation_x = -targetRect.x;
- actor.translation_y = -targetRect.y;
+ let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
+ actor.translation_x = -(targetRect.x - monitor.x);
+ actor.translation_y = -(targetRect.y - monitor.y);
this._fullscreenAnimation(shellwm, actor, oldFrameRect);
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]