[MPlayer-dev-eng] [PATCH] Fix for vo_gl2 fullscreen mode
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Feb 26 17:26:56 CET 2004
Hi,
> Just let me know when you think it can be applied to cvs.
Sure. Guess it's best to wait until I had the time to test more (and
also under windows, I nearly forgot).
>>I'd especially like to know if there is any special reason for this line:
>> XSelectInput(mDisplay, vo_window, NoEventMask);
>
>
> IMHO it looks fishy. Dunno why anyone want to disable all event.s
I had thought it was just for undoing what the line
XSelectInput(mDisplay, vo_window, StructureNotifyMask);
above did (I think I read that for new windows all events are disabled
by default...)
>>[gl2_fs_fix2.diff text/plain (2115 bytes)]
>>Index: vo_gl2.c
>>===================================================================
>>RCS file: /cvsroot/mplayer/main/libvo/vo_gl2.c,v
>>retrieving revision 1.40
>>diff -u -r1.40 vo_gl2.c
>>--- vo_gl2.c 22 Feb 2004 15:30:01 -0000 1.40
>>+++ vo_gl2.c 25 Feb 2004 21:44:36 -0000
>>@@ -677,23 +677,14 @@
>> XVisualInfo *vinfo, vinfo_buf;
>> XEvent xev;
>>
>>- if( flags&0x01 )
>>- {
>>- vo_fs = VO_TRUE;
>>- aspect(&d_width,&d_height,A_ZOOM);
>>- hint.x = 0;
>>- hint.y = 0;
>>- hint.width = vo_screenwidth;
>>- hint.height = vo_screenheight;
>>- hint.flags = PPosition | PSize;
>>- } else {
>> vo_fs = VO_FALSE;
>>+ vo_dwidth = d_width;
>>+ vo_dheight = d_height;
>> hint.x = 0;
>> hint.y = 0;
>> hint.width = d_width;
>> hint.height = d_height;
>> hint.flags = PPosition | PSize;
>>- }
>>
>> /* Make the window */
>>
>>@@ -711,7 +702,6 @@
>> {
>> 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));
>>- if ( flags&0x01 ) vo_x11_decoration( mDisplay,vo_window,0 );
>>
>> XSelectInput(mDisplay, vo_window, StructureNotifyMask);
>>
>>@@ -733,15 +723,15 @@
>> XNextEvent(mDisplay, &xev);
>> }
>> while (xev.type != MapNotify || xev.xmap.event != vo_window);
>>-
>>- XSelectInput(mDisplay, vo_window, NoEventMask);
>>-
>
>
> Dunno...Looks wrong to me
What part? and how it is now or the way it was before?
>> }
>> else {
>> vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 );
>>- if ( !(flags&1) ) XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height );
>>+ XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height );
>
>
>
> Why do you removed the "if" here ?
because that &1 was so ugly ;-). No seriously, without that "if" we have
in all cases a nice non-fullscreen window with the correct dimensions
for non-fs playing - one special case less that gives trouble (we
couldn't call vo_x11_fullscreen if we have a fullscreen window and want
fullscreen. But without that call, the correct window dimensions for
windowed playing aren't stored - giving an incorrectly sized window
after switching to windowed mode via 'f')
>> }
>>
>>+ if (flags & VOFLAG_FULLSCREEN)
>>+ vo_x11_fullscreen();
>>+
>> vo_x11_classhint( mDisplay,vo_window,"gl2" );
>> vo_hidecursor(mDisplay,vo_window);
>>
>>@@ -837,8 +827,6 @@
>>
>> image_height = height;
>> image_width = width;
>>- vo_dwidth = d_width;
>>- vo_dheight = d_height;
>> image_format = format;
>>
>> int_pause = 0;
>
>
> Otherwise it looks ok.
Too bad that I still have to make sure it actually _is_ OK ;-)
Greetings,
Reimar Döffinger
More information about the MPlayer-dev-eng
mailing list