[MPlayer-dev-eng] [patch] gl2 vo driver sets x11 class hint too late

Mark Tiefenbruck mark at fluxbox.org
Sat Feb 17 19:18:13 CET 2007


Description of bug: The gl2 vo driver maps its window before setting the x11
WM_CLASS window property, despite the requirements of ICCCM section 4.1.2.5(
http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.5 ). This causes window
recognition to fail, so saved user settings cannot be applied. You can see
one result of this at
http://sourceforge.net/tracker/index.php?func=detail&aid=1661748&group_id=35398&atid=413960.

The patch I've included just moves the lines that set the x11 class hint
before the window is mapped, in the same manner that the gl vo driver does
it.

  Thanks,
     Mark Tiefenbruck
-------------- next part --------------
--- libvo/old_vogl2.c	2007-02-16 18:56:11.000000000 -0800
+++ libvo/vo_gl2.c	2007-02-16 18:59:07.000000000 -0800
@@ -697,6 +697,9 @@
     vo_window = vo_x11_create_smooth_window(mDisplay, RootWindow(mDisplay,mScreen), 
 		                            vinfo->visual, hint.x, hint.y, hint.width, hint.height, vinfo->depth, vo_x11_create_colormap(vinfo));
 
+  vo_x11_classhint( mDisplay,vo_window,"gl2" );
+  vo_hidecursor(mDisplay,vo_window);
+
 	XSelectInput(mDisplay, vo_window, StructureNotifyMask);
 
 	/* Tell other applications about this window */
@@ -715,9 +718,6 @@
 	}
 	while (xev.type != MapNotify || xev.xmap.event != vo_window);
 
-  vo_x11_classhint( mDisplay,vo_window,"gl2" );
-  vo_hidecursor(mDisplay,vo_window);
-  
 	XSync(mDisplay, False);
 
 	//XSelectInput(mDisplay, vo_window, StructureNotifyMask); // !!!!


More information about the MPlayer-dev-eng mailing list