summaryrefslogtreecommitdiffstats
path: root/libvo/vo_x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/vo_x11.c')
-rw-r--r--libvo/vo_x11.c47
1 files changed, 6 insertions, 41 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index 3c8d672734..66c21ebea7 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -303,7 +303,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
uint32_t format)
{
// int screen;
- int fullscreen = 0;
// int interval, prefer_blank, allow_exp, nothing;
unsigned int fg, bg;
@@ -314,10 +313,12 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
const struct fmt2Xfmtentry_s *fmte = fmt2Xfmt;
#ifdef CONFIG_XF86VM
- int vm = 0;
+ int vm = flags & VOFLAG_MODESWITCHING;
#endif
+ int fullscreen = flags & (VOFLAG_FULLSCREEN|VOFLAG_MODESWITCHING);
+ Flip_Flag = flags & VOFLAG_FLIPPING;
+ zoomFlag = flags & VOFLAG_SWSCALE;
- vo_mouse_autohide = 1;
old_vo_dwidth = -1;
old_vo_dheight = -1;
@@ -329,16 +330,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
srcW = width;
srcH = height;
- if (flags & (VOFLAG_FULLSCREEN|VOFLAG_MODESWITCHING))
- fullscreen = 1;
-#ifdef CONFIG_XF86VM
- if (flags & VOFLAG_MODESWITCHING)
- vm = 1;
-#endif
- if (flags & VOFLAG_FLIPPING)
- Flip_Flag = 1;
- zoomFlag = flags & VOFLAG_SWSCALE;
-
// if(!fullscreen) zoomFlag=1; //it makes no sense to avoid zooming on windowd mode
//printf( "w: %d h: %d\n\n",vo_dwidth,vo_dheight );
@@ -395,36 +386,10 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
}
#endif
- if (WinID >= 0)
- {
- vo_window = WinID ? ((Window) WinID) : mRootWin;
- if (WinID)
- {
- XUnmapWindow(mDisplay, vo_window);
- XChangeWindowAttributes(mDisplay, vo_window, xswamask,
- &xswa);
- vo_x11_selectinput_witherr(mDisplay, vo_window,
- StructureNotifyMask |
- KeyPressMask |
- PropertyChangeMask |
- PointerMotionMask |
- ButtonPressMask |
- ButtonReleaseMask |
- ExposureMask);
- XMapWindow(mDisplay, vo_window);
- depth = vo_x11_update_geometry();
- } else
- XSelectInput(mDisplay, vo_window, ExposureMask);
- } else
- {
vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, vo_dwidth, vo_dheight,
flags, theCmap, "x11", title);
- }
-
- if (vo_gc != None)
- XFreeGC(mDisplay, vo_gc);
- vo_gc = XCreateGC(mDisplay, vo_window, 0L, &xgcv);
- XSync(mDisplay, False);
+ if (WinID > 0)
+ depth = vo_x11_update_geometry();
#ifdef CONFIG_XF86VM
if (vm)