* The keyboard target was always the first menu in the window list - no matter if that was hidden or not.
This fixes the bug described by Stefano in r23343. * Therefore, I enabled cached menu windows again. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23356 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#include "utf8_functions.h"
|
#include "utf8_functions.h"
|
||||||
|
|
||||||
#define USE_CACHED_MENUWINDOW 0
|
#define USE_CACHED_MENUWINDOW 1
|
||||||
|
|
||||||
using std::nothrow;
|
using std::nothrow;
|
||||||
using BPrivate::BMenuWindow;
|
using BPrivate::BMenuWindow;
|
||||||
|
|||||||
@@ -1172,6 +1172,9 @@ EventTarget*
|
|||||||
Desktop::KeyboardEventTarget()
|
Desktop::KeyboardEventTarget()
|
||||||
{
|
{
|
||||||
WindowLayer* window = _CurrentWindows().LastWindow();
|
WindowLayer* window = _CurrentWindows().LastWindow();
|
||||||
|
while (window != NULL && window->IsHidden()) {
|
||||||
|
window = window->PreviousWindow(fCurrentWorkspace);
|
||||||
|
}
|
||||||
if (window != NULL && window->Feel() == kMenuWindowFeel)
|
if (window != NULL && window->Feel() == kMenuWindowFeel)
|
||||||
return &window->EventTarget();
|
return &window->EventTarget();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user