* it seems we can skip _HandleKeyDown() when not active (keyboard navigation, shortcuts and screenshots).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29180 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1028,7 +1028,7 @@ FrameMoved(origin);
|
|||||||
|
|
||||||
case B_KEY_DOWN:
|
case B_KEY_DOWN:
|
||||||
{
|
{
|
||||||
if (!_HandleKeyDown(msg)) {
|
if (!fActive || !_HandleKeyDown(msg)) {
|
||||||
if (BView* view = dynamic_cast<BView*>(target)) {
|
if (BView* view = dynamic_cast<BView*>(target)) {
|
||||||
// TODO: cannot use "string" here if we support having different
|
// TODO: cannot use "string" here if we support having different
|
||||||
// font encoding per view (it's supposed to be converted by
|
// font encoding per view (it's supposed to be converted by
|
||||||
@@ -3400,8 +3400,8 @@ BWindow::_HandleKeyDown(BMessage* event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle shortcuts when window is active
|
// Handle shortcuts
|
||||||
if ((modifiers & B_COMMAND_KEY) != 0 && fActive) {
|
if ((modifiers & B_COMMAND_KEY) != 0) {
|
||||||
// Command+q has been pressed, so, we will quit
|
// Command+q has been pressed, so, we will quit
|
||||||
// the shortcut mechanism doesn't allow handlers outside the window
|
// the shortcut mechanism doesn't allow handlers outside the window
|
||||||
if (!fNoQuitShortcut && (key == 'Q' || key == 'q')) {
|
if (!fNoQuitShortcut && (key == 'Q' || key == 'q')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user