summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-18 16:45:55 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-01-25 17:00:13 +0900
commit87e635e8431ed21df8391f96f51e01b3233610b6 (patch)
treec7b281567d2aa0877889ce393ab1643a3edd35aa
parentb0759abe9c8afbcb83e713302b1884fc0a59fe8b (diff)
downloadmpv-87e635e8431ed21df8391f96f51e01b3233610b6.tar.bz2
mpv-87e635e8431ed21df8391f96f51e01b3233610b6.tar.xz
x11: fix mysterious issue with window embedding on OpenBox
For some reason, when using window embedding, and the window manager is OpenBox, calling XSetWMNormalHints() before the window is mapped, the initial window position will be off. It leaves some vertical space, instead of placing it on the top/left corner. Suspiciously, the vertical space is as much as a the height of normal window decoration. I don't know what kind of issue this is. Possibly an OpenBox bug, but then this happens even if the override-redirect flag is set. (This flag basically tells the X server to ignore the window manager. Normally we don't set it.) On other window managers, it works fine. So I don't know why this is happening. But this is easy to workaround. XSetWMNormalHints() isn't needed at all if embedding. Should fix #1235.
-rw-r--r--video/out/x11_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index bd75c104f3..2997b6f8df 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -988,7 +988,7 @@ static void vo_x11_sizehint(struct vo *vo, struct mp_rect rc, bool override_pos)
struct mp_vo_opts *opts = vo->opts;
struct vo_x11_state *x11 = vo->x11;
- if (!x11->window)
+ if (!x11->window || x11->parent)
return;
bool force_pos = opts->geometry.xy_valid || // explicitly forced by user