summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-03 23:19:38 +0100
committerwm4 <wm4@nowhere>2015-02-03 23:19:38 +0100
commitacc5e8f57419debdb74234a228b44db75023e28b (patch)
tree264325d71890401d379ad85e4c895e473eae94a2
parentc3c714b05903c26656e14c0bf229d873b73a0899 (diff)
downloadmpv-acc5e8f57419debdb74234a228b44db75023e28b.tar.bz2
mpv-acc5e8f57419debdb74234a228b44db75023e28b.tar.xz
player: make --force-window create the window immediately on start
Before this change, window creation was delayed until the video was initialized. This guaranteed that the first window size was that of the video, so the WM would place it correctly. Some time ago, it was requested on the IRC channel that --force-window should not do this. Sometimes, it can take a while until video is initialized, e.g. when youtube-dl is used (which incurs lots of network delay). In this case, it's awkward that it takes so long until a window (any window) is shown. On the other hand, this can cause incorrect window placement with some WMs. We simply hope that this won't happen with modern WMs. (Although it does with the WM I use, crappy old IceWM.)
-rw-r--r--player/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/player/main.c b/player/main.c
index 854d1ce540..330160671a 100644
--- a/player/main.c
+++ b/player/main.c
@@ -457,6 +457,7 @@ int mp_initialize(struct MPContext *mpctx)
"the selected video_out (-vo) device.\n");
return -1;
}
+ handle_force_window(mpctx, false);
mpctx->mouse_cursor_visible = true;
}