summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authoriive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2>2011-05-29 23:05:57 +0000
committerUoti Urpala <uau@mplayer2.org>2011-07-06 09:10:56 +0300
commitab1544b74d5d3f440dbcac801c3e3ebd676f9d7b (patch)
tree2848d7bc968e7b2709d5199b727d0a8e18db1598 /libvo
parent15513a77fb375acfbda6de36b806c0070472d04d (diff)
downloadmpv-ab1544b74d5d3f440dbcac801c3e3ebd676f9d7b.tar.bz2
mpv-ab1544b74d5d3f440dbcac801c3e3ebd676f9d7b.tar.xz
cleanup: x11_common: remove pointless GC operations
Remove useless XSetBackground() call right before freeing the graphic context. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33524 b3059339-0415-0410-9bf9-f77b7e298cf2 Create empty vo_gc graphic context instead of one with undefined foreground color. The code that uses vo_gc already employs XSetForeground()/XSetBackground() to change the context accordingly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33525 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/x11_common.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 12fc661dee..c576839ddb 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -732,7 +732,6 @@ void vo_x11_uninit(struct vo *vo)
{
if (x11->vo_gc != None)
{
- XSetBackground(vo->x11->display, x11->vo_gc, 0);
XFreeGC(vo->x11->display, x11->vo_gc);
x11->vo_gc = None;
}
@@ -1050,7 +1049,6 @@ void vo_x11_create_vo_window(struct vo *vo, XVisualInfo *vis, int x, int y,
struct MPOpts *opts = vo->opts;
struct vo_x11_state *x11 = vo->x11;
Display *mDisplay = vo->x11->display;
- XGCValues xgcv;
if (WinID >= 0) {
vo_fs = flags & VOFLAG_FULLSCREEN;
x11->window = WinID ? (Window)WinID : x11->rootwin;
@@ -1122,7 +1120,8 @@ void vo_x11_create_vo_window(struct vo *vo, XVisualInfo *vis, int x, int y,
final:
if (x11->vo_gc != None)
XFreeGC(mDisplay, x11->vo_gc);
- x11->vo_gc = XCreateGC(mDisplay, x11->window, GCForeground, &xgcv);
+ x11->vo_gc = XCreateGC(mDisplay, x11->window, 0, NULL);
+
XSync(mDisplay, False);
x11->vo_mouse_autohide = 1;
vo->event_fd = ConnectionNumber(x11->display);