]> git.sesse.net Git - vlc/commitdiff
* ./plugins/x11/xcommon.c: fixed x11 and xvideo alternate fullscreen (gibalou
authorSam Hocevar <sam@videolan.org>
Mon, 20 May 2002 22:30:19 +0000 (22:30 +0000)
committerSam Hocevar <sam@videolan.org>
Mon, 20 May 2002 22:30:19 +0000 (22:30 +0000)
    on t'aiiiiiiiiimeuh).

BUGS
ChangeLog
plugins/x11/xcommon.c

diff --git a/BUGS b/BUGS
index 2eac74455cefed8357f6c67ad0ae10b034597967..e0539322fcbba8448c96f8a72fb1e89dd7843a14 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -1,4 +1,4 @@
-List of known vlc bugs $Id: BUGS,v 1.12 2002/05/19 16:01:26 massiot Exp $
+List of known vlc bugs $Id: BUGS,v 1.13 2002/05/20 22:30:19 sam Exp $
 
    Please try to keep this file up to date. Also, grep for FIXME in the
 source files for more and more bugs to fix.
@@ -36,9 +36,6 @@ Video output:
   * On-the-fly resizing when using a chroma transformation doesn't work for
   all plugins. Currently it is only implemented for x11 and SDL.
 
-  * The alternate_fullscreen method of the x11 and xvideo plugins will
-  sometimes not switch to fullscreen.
-
 Chroma transformations:
 
   * Most chroma transformation modules completely ignore margins.
index 6bedf7ee1095ccc612c470c9048c5e9ae7636ee7..c756a2e28b6fa709c97f0dca83b073287c46da48 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,8 @@ HEAD
 0.4.0
 Mon, 20 May 2002 22:53:48 +0200
 
+  * ./configure.in: tried to fix the -lavcodec detection.
+  * ./plugins/x11/xcommon.c: fixed x11 and xvideo alternate fullscreen.
   * ./plugins/network/ipv6.c: experimental support for Windows IPv6
   * ./plugins/a52/a52.c: added an option to disable the dynamic range
     compression.
index ce73b04bc857f0217aa3594a2dcf281a68f1d641..4de03a751727072d5caa2c789affd974adf30a56 100644 (file)
@@ -2,7 +2,7 @@
  * xcommon.c: Functions common to the X11 and XVideo plugins
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: xcommon.c,v 1.33 2002/05/18 17:47:47 sam Exp $
+ * $Id: xcommon.c,v 1.34 2002/05/20 22:30:19 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -1415,7 +1415,6 @@ static void ToggleFullScreen ( vout_thread_t *p_vout )
     Atom prop;
     mwmhints_t mwmhints;
     int i_xpos, i_ypos, i_width, i_height;
-    XEvent xevent;
     XSetWindowAttributes attributes;
 
     p_vout->b_fullscreen = !p_vout->b_fullscreen;
@@ -1543,35 +1542,18 @@ static void ToggleFullScreen ( vout_thread_t *p_vout )
 
     /* We need to unmap and remap the window if we want the window 
      * manager to take our changes into effect */
-    XUnmapWindow( p_vout->p_sys->p_display, p_vout->p_sys->window);
-
-    XWindowEvent( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                  StructureNotifyMask, &xevent );
-    while( xevent.type != UnmapNotify )
-        XWindowEvent( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                      StructureNotifyMask, &xevent );
-
-    XMapRaised( p_vout->p_sys->p_display, p_vout->p_sys->window);
-
-    while( xevent.type != MapNotify )
-        XWindowEvent( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                      StructureNotifyMask, &xevent );
-
+    XReparentWindow( p_vout->p_sys->p_display,
+                     p_vout->p_sys->window,
+                     DefaultRootWindow( p_vout->p_sys->p_display ),
+                     0, 0 );
+    XSync( p_vout->p_sys->p_display, True );
     XMoveResizeWindow( p_vout->p_sys->p_display,
                        p_vout->p_sys->window,
                        i_xpos,
                        i_ypos,
                        i_width,
                        i_height );
-
-    /* Purge all ConfigureNotify events, this is needed to fix a bug where we
-     * would lose the original size of the window */
-    while( xevent.type != ConfigureNotify )
-        XWindowEvent( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                      StructureNotifyMask, &xevent );
-    while( XCheckWindowEvent( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                              StructureNotifyMask, &xevent ) );
-
+    XSync( p_vout->p_sys->p_display, True );
 
     /* We need to check that the window was really restored where we wanted */
     if( !p_vout->b_fullscreen )
@@ -1598,16 +1580,7 @@ static void ToggleFullScreen ( vout_thread_t *p_vout )
                          p_vout->p_sys->i_xpos_backup_2,
                          p_vout->p_sys->i_ypos_backup_2 );
 
-            /* Purge all ConfigureNotify events, this is needed to fix a bug
-             * where we would lose the original size of the window */
-            XWindowEvent( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                          StructureNotifyMask, &xevent );
-            while( xevent.type != ConfigureNotify )
-                XWindowEvent( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                              StructureNotifyMask, &xevent );
-            while( XCheckWindowEvent( p_vout->p_sys->p_display,
-                                      p_vout->p_sys->window,
-                                      StructureNotifyMask, &xevent ) );
+            XSync( p_vout->p_sys->p_display, True );
         }
 
         /* Check the size */
@@ -1630,20 +1603,11 @@ static void ToggleFullScreen ( vout_thread_t *p_vout )
                          p_vout->p_sys->i_width_backup_2,
                          p_vout->p_sys->i_height_backup_2 );
 
-            /* Purge all ConfigureNotify events, this is needed to fix a bug
-             * where we would lose the original size of the window */
-            XWindowEvent( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                          StructureNotifyMask, &xevent );
-            while( xevent.type != ConfigureNotify )
-                XWindowEvent( p_vout->p_sys->p_display, p_vout->p_sys->window,
-                              StructureNotifyMask, &xevent );
-            while( XCheckWindowEvent( p_vout->p_sys->p_display,
-                                      p_vout->p_sys->window,
-                                      StructureNotifyMask, &xevent ) );
+            XSync( p_vout->p_sys->p_display, True );
         }
     }
 
-    if( p_vout->p_sys->b_altfullscreen )
+    if( p_vout->p_sys->b_altfullscreen && p_vout->b_fullscreen )
         XSetInputFocus(p_vout->p_sys->p_display,
                        p_vout->p_sys->window,
                        RevertToParent,