]> git.sesse.net Git - vlc/commitdiff
* ./plugins/sdl/vout_sdl.c, ./plugins/x11/xcommon.c: when in fullscreen
authorSam Hocevar <sam@videolan.org>
Sun, 28 Apr 2002 11:56:13 +0000 (11:56 +0000)
committerSam Hocevar <sam@videolan.org>
Sun, 28 Apr 2002 11:56:13 +0000 (11:56 +0000)
    mode, the Esc key does not quit immediately, but first escapes from
    fullscreen mode. User-requested feature.

plugins/sdl/vout_sdl.c
plugins/x11/xcommon.c

index 89ae03cc7f3dcc4cb725671684bd2a390bf19ae5..878e995eaa2ab93cedf1c2b2346be58cb11ae085 100644 (file)
@@ -2,7 +2,7 @@
  * vout_sdl.c: SDL video output display method
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: vout_sdl.c,v 1.87 2002/03/21 22:10:33 gbazin Exp $
+ * $Id: vout_sdl.c,v 1.88 2002/04/28 11:56:13 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Pierre Baillet <oct@zoy.org>
@@ -407,8 +407,18 @@ static int vout_Manage( vout_thread_t *p_vout )
 
             switch( event.key.keysym.sym )
             {
-            case SDLK_q:                                             /* quit */
             case SDLK_ESCAPE:
+                if( p_vout->b_fullscreen )
+                {
+                    p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
+                }
+                else
+                {
+                    p_main->p_intf->b_die = 1;
+                }
+                break;
+
+            case SDLK_q:                                             /* quit */
                 p_main->p_intf->b_die = 1;
                 break;
 
index 3a7f2c90ce1c42f2119d33b5639c95b4dd0e7269..2175f4a0cccd94727cf6a87e86074886dad66f5d 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.28 2002/04/23 14:16:20 sam Exp $
+ * $Id: xcommon.c,v 1.29 2002/04/28 11:56:13 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -638,7 +638,14 @@ static int vout_Manage( vout_thread_t *p_vout )
             switch( x_key_symbol )
             {
                  case XK_Escape:
-                     p_main->p_intf->b_die = 1;
+                     if( p_vout->b_fullscreen )
+                     {
+                         p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
+                     }
+                     else
+                     {
+                         p_main->p_intf->b_die = 1;
+                     }
                      break;
                  case XK_Menu:
                      p_main->p_intf->b_menu_change = 1;