Implemented Switcher support in BWindow - doesn't yet work correctly for some
reason, though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17164 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -25,7 +25,7 @@ if ! $(HAIKU_COMPATIBLE) {
|
|||||||
|
|
||||||
SetSubDirSupportedPlatforms haiku libbe_test ;
|
SetSubDirSupportedPlatforms haiku libbe_test ;
|
||||||
|
|
||||||
UsePrivateHeaders shared app interface input ;
|
UsePrivateHeaders app input interface shared tracker ;
|
||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) BTextView ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) BTextView ] ;
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
#include <PortLink.h>
|
#include <PortLink.h>
|
||||||
#include <ServerProtocol.h>
|
#include <ServerProtocol.h>
|
||||||
#include <TokenSpace.h>
|
#include <TokenSpace.h>
|
||||||
|
#include <tracker_private.h>
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -2807,6 +2808,20 @@ BWindow::_HandleKeyDown(char key, uint32 modifiers)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Deskbar's Switcher
|
||||||
|
if (key == B_TAB && (modifiers & B_CONTROL_KEY) != 0) {
|
||||||
|
BMessenger deskbar(kDeskbarSignature);
|
||||||
|
if (deskbar.IsValid()) {
|
||||||
|
BMessage message('TASK');
|
||||||
|
message.AddInt32("key", B_TAB);
|
||||||
|
message.AddInt32("modifiers", modifiers);
|
||||||
|
message.AddInt64("when", system_time());
|
||||||
|
message.AddInt32("team", Team());
|
||||||
|
deskbar.SendMessage(&message);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Handle shortcuts
|
// Handle shortcuts
|
||||||
if ((modifiers & B_COMMAND_KEY) != 0) {
|
if ((modifiers & B_COMMAND_KEY) != 0) {
|
||||||
// Command+q has been pressed, so, we will quit
|
// Command+q has been pressed, so, we will quit
|
||||||
|
|||||||
Reference in New Issue
Block a user