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
This commit is contained in:
parent
48a54e8ac4
commit
1c3ea1649f
@ -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);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user