diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-06-27 10:26:13 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-06-27 10:26:13 +0000 |
commit | f131aafff160e816a3c5904d664561ffe9f32058 (patch) | |
tree | 31eb8b5970484238c36a7ca3d2cad288785879a3 /libvo/vo_dxr3.c | |
parent | b4be37acaf5d725d0c81508907fef9733acab444 (diff) | |
download | mpv-f131aafff160e816a3c5904d664561ffe9f32058.tar.bz2 mpv-f131aafff160e816a3c5904d664561ffe9f32058.tar.xz |
Make X11 window creation and (with -fixed-vo) management simpler and more
consistent by introducing a new function that handles most of the
ugly things. Changes of behaviour with some vos is unavoidable, bug reports
welcome.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23675 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_dxr3.c')
-rw-r--r-- | libvo/vo_dxr3.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c index 754efd22b2..4e46403a30 100644 --- a/libvo/vo_dxr3.c +++ b/libvo/vo_dxr3.c @@ -616,22 +616,13 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ depth = 24; } XMatchVisualInfo(mDisplay, mScreen, depth, TrueColor, &vinfo); + vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, + d_width, d_height, flags, + CopyFromParent, "Viewing Window", title); xswa.background_pixel = KEY_COLOR; xswa.border_pixel = 0; xswamask = CWBackPixel | CWBorderPixel; - hint.y = vo_dy; - hint.x = vo_dx; - hint.base_width = hint.width = vo_dwidth; - hint.base_height = hint.height = vo_dheight; - hint.flags = PPosition | PSize; - vo_window = XCreateWindow(mDisplay, mRootWin, hint.x, hint.y, hint.width, hint.height, 0, depth, CopyFromParent, vinfo.visual, xswamask, &xswa); - vo_x11_classhint(mDisplay, vo_window, "Viewing Window"); - vo_hidecursor(mDisplay, vo_window); - vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PropertyChangeMask); - XSetStandardProperties(mDisplay, vo_window, "DXR3 Overlay", "DXR3 Overlay", None, NULL, 0, &hint); - XSetWMNormalHints(mDisplay, vo_window, &hint); - XMapWindow(mDisplay, vo_window); - XSync(mDisplay, False); + XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xswa); } /* Start setting up overlay */ |