summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-22 01:35:12 +0100
committerwm4 <wm4@nowhere>2020-02-22 01:35:12 +0100
commitc1d744328e737fe80ecfdc0cbb6260d7699f4328 (patch)
tree6abb992df554c398033c6310872e56af21d7fc23 /video
parentc68b8136782ab914c95932b1c0d38a8230bbb628 (diff)
downloadmpv-c1d744328e737fe80ecfdc0cbb6260d7699f4328.tar.bz2
mpv-c1d744328e737fe80ecfdc0cbb6260d7699f4328.tar.xz
x11: switch back to StaticGravity
This was changed 6 years ago (444e583b6) and seemed to work fine. But it does seem to cause issues with IceWM sometimes, while with StaticGravity the problem is gone. Comparing both gravity values, reading the confused source code comment, and reading the referenced commit message, I can't determine what it even does, I just remove it. Reproduction: - start mpv in windowed mode, with 2 videos of different size - switch to second video - switch window with alt+tab - switch back to mpv with alt+tab - window moves to X=0 There's probably a better way to fix this. Please send a patch.
Diffstat (limited to 'video')
-rw-r--r--video/out/x11_common.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index d6ecf4969c..898efd2ad5 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1308,11 +1308,8 @@ static void vo_x11_sizehint(struct vo *vo, struct mp_rect rc, bool override_pos)
hint->flags |= PMinSize;
hint->min_width = hint->min_height = 4;
- // This will use the top/left corner of the window for positioning, instead
- // of the top/left corner of the client. _NET_MOVERESIZE_WINDOW could be
- // used to get a different reference point, while keeping gravity.
hint->flags |= PWinGravity;
- hint->win_gravity = CenterGravity;
+ hint->win_gravity = StaticGravity;
XSetWMNormalHints(x11->display, x11->window, hint);
XFree(hint);