Tracker: Filter out lock modifiers on Open with window
Change-Id: I73bd38b3596a9f9d5793df4bd11f32c62d6e7eff Reviewed-on: https://review.haiku-os.org/c/haiku/+/9524 Tested-by: Commit checker robot <[email protected]> Reviewed-by: John Scipione <[email protected]>
This commit is contained in:
@@ -322,8 +322,9 @@ OpenWithContainerWindow::KeyDownFilter(BMessage* message, BHandler**,
|
|||||||
if (message->FindInt8("byte", (int8*)&key) != B_OK)
|
if (message->FindInt8("byte", (int8*)&key) != B_OK)
|
||||||
return B_DISPATCH_MESSAGE;
|
return B_DISPATCH_MESSAGE;
|
||||||
|
|
||||||
int32 modifiers = 0;
|
int32 modifiers = message->GetInt32("modifiers", 0);
|
||||||
message->FindInt32("modifiers", &modifiers);
|
modifiers &= B_COMMAND_KEY | B_OPTION_KEY | B_SHIFT_KEY | B_CONTROL_KEY | B_MENU_KEY;
|
||||||
|
|
||||||
if (modifiers == 0 && key == B_ESCAPE) {
|
if (modifiers == 0 && key == B_ESCAPE) {
|
||||||
filter->Looper()->PostMessage(kCancelButton);
|
filter->Looper()->PostMessage(kCancelButton);
|
||||||
return B_SKIP_MESSAGE;
|
return B_SKIP_MESSAGE;
|
||||||
|
|||||||
Reference in New Issue
Block a user