Revert "Fix window behavior when default button is present"
With some testing, found that even with the second patch
provided in #10792, the behaviour is still inconsistent, so
reverting for now.
This reverts commit 273109e004.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2014, Haiku.
|
* Copyright 2001-2011, Haiku.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -3287,11 +3287,9 @@ BWindow::_DetermineTarget(BMessage* message, BHandler* target)
|
|||||||
case B_KEY_UP:
|
case B_KEY_UP:
|
||||||
{
|
{
|
||||||
// if we have a default button, it might want to hear
|
// if we have a default button, it might want to hear
|
||||||
// about pressing the <enter> key, but it shouldn't
|
// about pressing the <enter> key
|
||||||
// intercept it if another BControl is focused
|
|
||||||
int32 rawChar;
|
int32 rawChar;
|
||||||
if (DefaultButton() != NULL
|
if (DefaultButton() != NULL
|
||||||
&& dynamic_cast<BControl*>(CurrentFocus()) == NULL
|
|
||||||
&& message->FindInt32("raw_char", &rawChar) == B_OK
|
&& message->FindInt32("raw_char", &rawChar) == B_OK
|
||||||
&& rawChar == B_ENTER)
|
&& rawChar == B_ENTER)
|
||||||
return DefaultButton();
|
return DefaultButton();
|
||||||
|
|||||||
Reference in New Issue
Block a user