From abc3b04ccfecd8f95faae1e1606968e6ae6b2729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Wed, 6 Oct 2004 09:28:36 +0000 Subject: [PATCH] implemented BInputServerFilter::GetScreenRegion. Tested with R5 screen_saver filter successfully. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9225 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/input/InputServer.h | 3 ++- src/servers/input/InputServerFilter.cpp | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/servers/input/InputServer.h b/src/servers/input/InputServer.h index 206bfdad0e..28982cab1a 100644 --- a/src/servers/input/InputServer.h +++ b/src/servers/input/InputServer.h @@ -165,7 +165,8 @@ public: static BLocker gInputMethodListLocker; static DeviceManager gDeviceManager; - + + BRect& ScreenFrame() { return fFrame;}; private: status_t LoadKeymap(); status_t LoadSystemKeymap(); diff --git a/src/servers/input/InputServerFilter.cpp b/src/servers/input/InputServerFilter.cpp index 102c6dfc6f..f2574fbc4c 100644 --- a/src/servers/input/InputServerFilter.cpp +++ b/src/servers/input/InputServerFilter.cpp @@ -30,6 +30,7 @@ /*****************************************************************************/ +#include #include #include "InputServer.h" @@ -61,7 +62,7 @@ status_t BInputServerFilter::InitCheck() { CALLED(); - return B_OK; + return B_OK; } @@ -74,7 +75,7 @@ BInputServerFilter::Filter(BMessage *message, BList *outList) { CALLED(); - return B_DISPATCH_MESSAGE; + return B_DISPATCH_MESSAGE; } @@ -85,9 +86,11 @@ BInputServerFilter::Filter(BMessage *message, status_t BInputServerFilter::GetScreenRegion(BRegion *region) const { - status_t dummy; + if (!region) + return B_BAD_VALUE; - return dummy; + *region = BRegion(((InputServer*)be_app)->ScreenFrame()); + return B_OK; }