[MPlayer-dev-eng] GUI and vo_x11_create_vo_window()
Ingo Brückl
ib at wupperonline.de
Thu Aug 18 17:38:37 CEST 2011
For quite a while I've known that there is a scaling problem with the GUI
if a video should start in fullscreen right from the beginning. So far, I've
used "-fstype none" which gave me a correctly scaled window, but not in
real fullscreen mode (my window manager has a taskbar on top). I decided to
revise and rework the whole GUI fullscreen code and playback window handling
which worked out fine and I finally could get rid of the -fstype option to
get a real fullscreen window, but unfortunately the scaling problem for the
start in fullscreen mode remained.
To make a long story short, after hours of searching I finally found the
reason for that. When vo_x11_create_vo_window() is called for an existing
window (WinID > 0), it resets vo_fs from passed flags, although this window
may already be in fullscreen mode. gui(GUI_SETUP_VIDEO_WINDOW, 0) is called
before vo->config() which then calls vo_x11_create_vo_window(), so there is
no chance in the GUI to prevent vo_fs from being reset until we either:
#1: pass and return the flags
Index: libvo/video_out.c
===================================================================
--- libvo/video_out.c (revision 33996)
+++ libvo/video_out.c (working copy)
@@ -372,7 +372,7 @@
#ifdef CONFIG_GUI
if (use_gui) {
// GUI creates and manages window for us
- gui(GUI_SETUP_VIDEO_WINDOW, 0);
+ gui(GUI_SETUP_VIDEO_WINDOW, &flags);
}
#endif
}
or
#2: don't touch vo_fs (if WinID > 0)
Index: libvo/x11_common.c
===================================================================
--- libvo/x11_common.c (revision 33996)
+++ libvo/x11_common.c (working copy)
@@ -1069,7 +1069,7 @@
const char *classname, const char *title)
{
if (WinID >= 0) {
- vo_fs = flags & VOFLAG_FULLSCREEN;
+ if (!WinID) vo_fs = flags & VOFLAG_FULLSCREEN;
vo_window = WinID ? (Window)WinID : mRootWin;
if (col_map != CopyFromParent) {
unsigned long xswamask = CWColormap;
Which one is prefered?
Ingo
More information about the MPlayer-dev-eng
mailing list