* Use BeginFullScreen() to hide the mouse cursor ;
authorChristophe Massiot <massiot@videolan.org>
Tue, 24 Dec 2002 23:00:51 +0000 (23:00 +0000)
committerChristophe Massiot <massiot@videolan.org>
Tue, 24 Dec 2002 23:00:51 +0000 (23:00 +0000)
* Cheat with the screen saver (closes #46).

modules/gui/macosx/intf.m
modules/gui/macosx/vout.h
modules/gui/macosx/vout.m

index 5b2a355..30bdbf5 100644 (file)
@@ -2,7 +2,7 @@
  * intf.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: intf.m,v 1.10 2002/12/14 19:34:06 gbazin Exp $
+ * $Id: intf.m,v 1.11 2002/12/24 23:00:51 massiot Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -196,7 +196,7 @@ static void Run( intf_thread_t *p_intf )
 
     [o_mu_file setTitle: _NS("File")];
     [o_mi_open_file setTitle: _NS("Open File...")];
-    [o_mi_open_generic setTitle: _NS("Open Generic...")];
+    [o_mi_open_generic setTitle: _NS("Open...")];
     [o_mi_open_disc setTitle: _NS("Open Disc...")];
     [o_mi_open_net setTitle: _NS("Open Network...")];
     [o_mi_open_recent setTitle: _NS("Open Recent")];
@@ -310,6 +310,9 @@ static void Run( intf_thread_t *p_intf )
             vout_thread_t * p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT,
                                                       FIND_ANYWHERE );
 
+            /* Disable screen saver. */
+            UpdateSystemActivity( UsrActivity );
+
             vlc_mutex_lock( &p_input->stream.stream_lock );
 
             if( !p_input->b_die )
index cc69b6f..9f6f3d6 100644 (file)
@@ -2,7 +2,7 @@
  * vout.h: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: vout.h,v 1.2 2002/12/08 05:30:47 jlj Exp $
+ * $Id: vout.h,v 1.3 2002/12/24 23:00:51 massiot Exp $
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *          Florian G. Pflug <fgp@phlo.org>
@@ -82,5 +82,6 @@ struct vout_sys_t
     MatrixRecordPtr p_matrix;
     DecompressorComponent img_dc;
     ImageDescriptionHandle h_img_descr;
+    Ptr p_fullscreen_state;
 #endif
 };
index 2791307..bfa2425 100644 (file)
@@ -2,7 +2,7 @@
  * vout.m: MacOS X video output plugin
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: vout.m,v 1.7 2002/12/08 05:30:47 jlj Exp $
+ * $Id: vout.m,v 1.8 2002/12/24 23:00:51 massiot Exp $
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *          Florian G. Pflug <fgp@phlo.org>
@@ -130,6 +130,7 @@ int E_(OpenVideo) ( vlc_object_t *p_this )
     p_vout->p_sys->h_img_descr = 
         (ImageDescriptionHandle)NewHandleClear( sizeof(ImageDescription) );
     p_vout->p_sys->p_matrix = (MatrixRecordPtr)malloc( sizeof(MatrixRecord) );
+    p_vout->p_sys->p_fullscreen_state;
 
     p_vout->p_sys->b_mouse_pointer_visible = 1;
 
@@ -533,11 +534,15 @@ static int CoToggleFullscreen( vout_thread_t *p_vout )
 
     if( p_vout->b_fullscreen )
     {
-        HideMenuBar();
+        if ( p_vout->p_sys->p_fullscreen_state == NULL )
+            BeginFullScreen( &p_vout->p_sys->p_fullscreen_state, NULL, 0, 0,
+                             NULL, NULL, fullScreenHideCursor | fullScreenAllowEvents );
     }
     else
     {
-        ShowMenuBar();
+        if ( p_vout->p_sys->p_fullscreen_state != NULL )
+            EndFullScreen ( p_vout->p_sys->p_fullscreen_state, NULL );
+        p_vout->p_sys->p_fullscreen_state = NULL;
     }
 
     if( CoCreateWindow( p_vout ) )