Show workspace number in the upper left corner
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12497 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d6b771678c
commit
b9cc06b57c
@ -51,6 +51,7 @@
|
||||
#include "Decorator.h"
|
||||
|
||||
//#define DEBUG_ROOTLAYER
|
||||
#define APPSERVER_ROOTLAYER_SHOW_WORKSPACE_NUMBER
|
||||
|
||||
#ifdef DEBUG_ROOTLAYER
|
||||
#define STRACE(a) printf a
|
||||
@ -1445,6 +1446,17 @@ void RootLayer::KeyboardEventHandler(int32 code, BPortLink& msg)
|
||||
show_final_scene(exFocus, exActive);
|
||||
if (string)
|
||||
free(string);
|
||||
|
||||
#ifdef APPSERVER_ROOTLAYER_SHOW_WORKSPACE_NUMBER
|
||||
{
|
||||
// to draw the current Workspace index on screen.
|
||||
BRegion reg(fVisible);
|
||||
fDriver->ConstrainClippingRegion(®);
|
||||
Draw(reg.Frame());
|
||||
fDriver->ConstrainClippingRegion(NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1994,3 +2006,14 @@ void RootLayer::show_final_scene(WinBorder *exFocus, WinBorder *exActive)
|
||||
if (fLastMouseMoved == NULL)
|
||||
debugger("RootLayer::KeyboardEventHandler: 'fLastMouseMoved' can't be null.\n");
|
||||
}
|
||||
|
||||
void RootLayer::Draw(const BRect &r)
|
||||
{
|
||||
fDriver->FillRect(r, fLayerData->ViewColor());
|
||||
#ifdef APPSERVER_ROOTLAYER_SHOW_WORKSPACE_NUMBER
|
||||
char string[30];
|
||||
sprintf(string, "Workspace %ld", fActiveWksIndex+1);
|
||||
fDriver->DrawString(string, strlen(string), BPoint(5,15),
|
||||
fLayerData);
|
||||
#endif
|
||||
}
|
||||
|
@ -121,6 +121,8 @@ public:
|
||||
void GoRedraw(const Layer *layer, const BRegion ®ion);
|
||||
void GoChangeWinBorderFeel(const WinBorder *winBorder, int32 newFeel);
|
||||
|
||||
virtual void Draw(const BRect &r);
|
||||
|
||||
// Debug methods
|
||||
void PrintToStream(void);
|
||||
thread_id LockingThread() { return fAllRegionsLock.LockingThread(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user