comparison libvo/x11_common.c @ 7057:9a69417e2e0f

this piece of code should prevent major fullscreen screwups, which can be otherwise triggered by rapid switching to fullscreen and back. patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
author arpi
date Wed, 21 Aug 2002 21:24:23 +0000
parents ce67cc1f0beb
children b65b78640d49
comparison
equal deleted inserted replaced
7056:ad9a06fc40f8 7057:9a69417e2e0f
586 { 586 {
587 case Expose: 587 case Expose:
588 ret|=VO_EVENT_EXPOSE; 588 ret|=VO_EVENT_EXPOSE;
589 break; 589 break;
590 case ConfigureNotify: 590 case ConfigureNotify:
591 if (!vo_fs && (Event.xconfigure.width == vo_screenwidth || Event.xconfigure.height == vo_screenheight)) break;
592 if (vo_fs && Event.xconfigure.width != vo_screenwidth && Event.xconfigure.height != vo_screenheight) break;
591 vo_dwidth=Event.xconfigure.width; 593 vo_dwidth=Event.xconfigure.width;
592 vo_dheight=Event.xconfigure.height; 594 vo_dheight=Event.xconfigure.height;
593 #if 0 595 #if 0
594 /* when resizing, x and y are zero :( */ 596 /* when resizing, x and y are zero :( */
595 vo_dx=Event.xconfigure.x; 597 vo_dx=Event.xconfigure.x;
754 { 756 {
755 int x=0,y=0,w=vo_screenwidth,h=vo_screenheight; 757 int x=0,y=0,w=vo_screenwidth,h=vo_screenheight;
756 758
757 if ( WinID >= 0 ) return; 759 if ( WinID >= 0 ) return;
758 760
761 if ( !vo_fs && (vo_dwidth == vo_screenwidth || vo_dheight == vo_screenheight)) return;
762 if ( vo_fs && vo_dwidth != vo_screenwidth && vo_dheight != vo_screenheight) return;
763
759 if ( vo_fs ) 764 if ( vo_fs )
760 { vo_fs=VO_FALSE; x=vo_old_x; y=vo_old_y; w=vo_old_width; h=vo_old_height; } 765 { vo_fs=VO_FALSE; x=vo_old_x; y=vo_old_y; w=vo_old_width; h=vo_old_height; }
761 else { vo_fs=VO_TRUE; vo_old_x=vo_dx; vo_old_y=vo_dy; vo_old_width=vo_dwidth; vo_old_height=vo_dheight; } 766 else { vo_fs=VO_TRUE; vo_old_x=vo_dx; vo_old_y=vo_dy; vo_old_width=vo_dwidth; vo_old_height=vo_dheight; }
762 767
763 vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 0 : 1 ); 768 vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 0 : 1 );