]> git.sesse.net Git - vlc/commitdiff
Under BeOS, disable the screensaver if playing in fullscreen.
authorEric Petit <titer@videolan.org>
Fri, 18 Apr 2003 16:38:58 +0000 (16:38 +0000)
committerEric Petit <titer@videolan.org>
Fri, 18 Apr 2003 16:38:58 +0000 (16:38 +0000)
configure.ac.in
modules/gui/beos/VideoOutput.cpp

index d3490befb4327fe237fa93b0f46a6424b0efa762..d0d6b8956d38e3f37b90f799cbb082deccd2e1bc 100644 (file)
@@ -153,7 +153,7 @@ case "x${target_os}" in
     CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CXXFLAGS="${CXXFLAGS_save}"
     LDFLAGS_vlc="${LDFLAGS_vlc} -lbe"
     LDFLAGS_plugins="${LDFLAGS_plugins} -nostart"
-    LDFLAGS_beos="${LDFLAGS_beos} -lbe -lmedia -lroot -ltracker -lstdc++.r4 -ltranslation"
+    LDFLAGS_beos="${LDFLAGS_beos} -lbe -lmedia -lroot -ltracker -lstdc++.r4 -ltranslation -lgame"
     dnl BONE or not BONE ? only BONE has libbind.so
     AC_CHECK_LIB( bind, inet_ntoa,
         [ LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket -lbind"
index d1e61eedd565280b9adbfabc3a300e5130f15201..9b90ef1b811af73604b42a4ee411014a113c78f5 100644 (file)
@@ -2,7 +2,7 @@
  * vout_beos.cpp: beos video output display method
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: VideoOutput.cpp,v 1.14 2003/04/18 16:10:28 titer Exp $
+ * $Id: VideoOutput.cpp,v 1.15 2003/04/18 16:38:58 titer Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -43,6 +43,7 @@
 #include <NodeInfo.h>
 #include <String.h>
 #include <TranslatorRoster.h>
+#include <WindowScreen.h>
 
 /* VLC headers */
 #include <vlc/vlc.h>
@@ -1224,6 +1225,7 @@ VLCView::Pulse()
        // We are getting the pulse messages no matter if the mouse is over
        // this view. If we are in full screen mode, we want to hide the cursor
        // even if it is not.
+       VideoWindow *videoWindow = dynamic_cast<VideoWindow*>(Window());
        if (!fCursorHidden)
        {
                if (fCursorInside
@@ -1231,12 +1233,24 @@ VLCView::Pulse()
                {
                        be_app->ObscureCursor();
                        fCursorHidden = true;
-                       VideoWindow *videoWindow = dynamic_cast<VideoWindow*>(Window());
+                       
                        // hide the interface window as well if full screen
                        if (videoWindow && videoWindow->IsFullScreen())
                                videoWindow->SetInterfaceShowing(false);
                }
        }
+
+    // Workaround to disable the screensaver in full screen:
+    // we simulate an activity every 29 seconds        
+       if( videoWindow && videoWindow->IsFullScreen() &&
+           system_time() - fLastMouseMovedTime > 29000000 )
+       {
+           BPoint where;
+               uint32 buttons;
+               GetMouse(&where, &buttons, false);
+               ConvertToScreen(&where);
+               set_mouse_position((int32) where.x, (int32) where.y);
+       }
 }
 
 /*****************************************************************************