Now the kDesktopWindowFeel means also that the window doesn't want focus.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15953 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2006-01-15 19:36:16 +00:00
parent ddb7d0b6a6
commit 3532dd20d5
2 changed files with 6 additions and 4 deletions

View File

@ -22,6 +22,7 @@
#include "ServerConfig.h" #include "ServerConfig.h"
#include "ServerScreen.h" #include "ServerScreen.h"
#include "ServerWindow.h" #include "ServerWindow.h"
#include "WindowPrivate.h"
#include "WindowLayer.h" #include "WindowLayer.h"
#include "Workspace.h" #include "Workspace.h"
#include "WorkspacesLayer.h" #include "WorkspacesLayer.h"
@ -896,8 +897,8 @@ Desktop::SetFocusWindow(WindowLayer* focus)
// TODO: test for FFM and B_LOCK_WINDOW_FOCUS // TODO: test for FFM and B_LOCK_WINDOW_FOCUS
if (focus == fFocus && focus != NULL && (focus->Flags() & B_AVOID_FOCUS) == 0 if ((focus == fFocus && focus != NULL && (focus->Flags() & B_AVOID_FOCUS) == 0
&& !hasModal) { && !hasModal) || focus->Feel() == kDesktopWindowFeel) {
// the window that is supposed to get focus already has focus // the window that is supposed to get focus already has focus
UnlockAllWindows(); UnlockAllWindows();
return; return;

View File

@ -823,7 +823,7 @@ WindowLayer::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
DesktopSettings desktopSettings(fDesktop); DesktopSettings desktopSettings(fDesktop);
// Activate window in case it doesn't accept first click, and // Activate window in case it doesn't accept first click, and
// we're not in FFM mode // we're not in FFM mode, and it's not the desktop window
if ((Flags() & B_WILL_ACCEPT_FIRST_CLICK) == 0 if ((Flags() & B_WILL_ACCEPT_FIRST_CLICK) == 0
&& desktopSettings.MouseMode() == B_NORMAL_MOUSE) && desktopSettings.MouseMode() == B_NORMAL_MOUSE)
fDesktop->ActivateWindow(this); fDesktop->ActivateWindow(this);
@ -976,7 +976,8 @@ WindowLayer::MouseMoved(BMessage *msg, BPoint where, int32* _viewToken,
// change focus in FFM mode // change focus in FFM mode
DesktopSettings desktopSettings(fDesktop); DesktopSettings desktopSettings(fDesktop);
if (desktopSettings.MouseMode() != B_NORMAL_MOUSE && !IsFocus() && !(Flags() & B_AVOID_FOCUS)) if (desktopSettings.MouseMode() != B_NORMAL_MOUSE && !IsFocus()
&& !(Flags() & B_AVOID_FOCUS) && Feel() != kDesktopWindowFeel)
fDesktop->SetFocusWindow(this); fDesktop->SetFocusWindow(this);
} }