From 24a8416ea70ea7898a281090210f1314ce149e06 Mon Sep 17 00:00:00 2001 From: Jessica Hamilton Date: Sat, 3 May 2014 10:01:49 +1200 Subject: [PATCH] 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 273109e0048442ba5f6361d6e683e5b4a69a472b. --- src/kits/interface/Window.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index f315dacf94..f23681f23d 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2014, Haiku. + * Copyright 2001-2011, Haiku. * Distributed under the terms of the MIT License. * * Authors: @@ -3287,11 +3287,9 @@ BWindow::_DetermineTarget(BMessage* message, BHandler* target) case B_KEY_UP: { // if we have a default button, it might want to hear - // about pressing the key, but it shouldn't - // intercept it if another BControl is focused + // about pressing the key int32 rawChar; if (DefaultButton() != NULL - && dynamic_cast(CurrentFocus()) == NULL && message->FindInt32("raw_char", &rawChar) == B_OK && rawChar == B_ENTER) return DefaultButton();