[PATCH] vo_x11_fullscreen check width and height
Reimar Döffinger <[email protected]> Mon, 23 Feb 2004 21:38:03 +0100
| Newsgroups | gmane.comp.video.mplayer.g2.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, I want to propose the following patch that makes sure that the window width and height are set to values != 0 I think this would be helpfull as X errors are a bit hard to track down (at least I needed some time to find it), and additionally it will 'fix' vo_gl2 until I get around to really fix it (which starts directly in fullscreen mode and thus vo_old_width and vo_old_height aren't set). Comments are welcome. Greetings, Reimar Döffinger _______________________________________________ MPlayer-G2-dev mailing list [email protected] http://mplayerhq.hu/mailman/listinfo/mplayer-g2-dev
fullscreen_check.diff
(text/plain, 733 B)
Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.162
diff -u -r1.162 x11_common.c
--- x11_common.c 16 Jan 2004 17:31:37 -0000 1.162
+++ x11_common.c 23 Feb 2004 20:31:50 -0000
@@ -1040,6 +1040,11 @@
if(vo_dwidth != vo_screenwidth && vo_dheight != vo_screenheight) return;
vo_fs=VO_FALSE;
x=vo_old_x; y=vo_old_y; w=vo_old_width; h=vo_old_height;
+ if (w == 0 || h == 0) { // otherwise we will get a SIGABORT
+ mp_msg(MSGT_VO, MSGL_ERR, "[x11_common] bad window size!\n");
+ w = (vo_dwidth)?vo_dwidth:50;
+ h = (vo_dheight)?vo_dheight:50;
+ }
} else {
// win->fs
if(vo_old_width &&