From 5b9ea47e111632c29aab62f8d0a0105186d3d782 Mon Sep 17 00:00:00 2001 From: Eric Petit Date: Fri, 18 Apr 2003 16:38:58 +0000 Subject: [PATCH] Under BeOS, disable the screensaver if playing in fullscreen. --- configure.ac.in | 2 +- modules/gui/beos/VideoOutput.cpp | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index d3490befb4..d0d6b8956d 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -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" diff --git a/modules/gui/beos/VideoOutput.cpp b/modules/gui/beos/VideoOutput.cpp index d1e61eedd5..9b90ef1b81 100644 --- a/modules/gui/beos/VideoOutput.cpp +++ b/modules/gui/beos/VideoOutput.cpp @@ -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 * Samuel Hocevar @@ -43,6 +43,7 @@ #include #include #include +#include /* VLC headers */ #include @@ -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(Window()); if (!fCursorHidden) { if (fCursorInside @@ -1231,12 +1233,24 @@ VLCView::Pulse() { be_app->ObscureCursor(); fCursorHidden = true; - VideoWindow *videoWindow = dynamic_cast(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); + } } /***************************************************************************** -- 2.39.2