* More cleanup of Frontmost().
* Added support for kWindowScreenFeel (those are now on top of everything, even menus can't disturb them). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17124 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -67,6 +67,7 @@ using std::nothrow;
|
|||||||
// the update session, which tells us the cause of the update
|
// the update session, which tells us the cause of the update
|
||||||
#define DELAYED_BACKGROUND_CLEARING 1
|
#define DELAYED_BACKGROUND_CLEARING 1
|
||||||
|
|
||||||
|
|
||||||
WindowLayer::WindowLayer(const BRect& frame, const char *name,
|
WindowLayer::WindowLayer(const BRect& frame, const char *name,
|
||||||
window_look look, window_feel feel,
|
window_look look, window_feel feel,
|
||||||
uint32 flags, uint32 workspaces,
|
uint32 flags, uint32 workspaces,
|
||||||
@@ -1382,10 +1383,6 @@ WindowLayer::Frontmost(WindowLayer* first, int32 workspace)
|
|||||||
if (fFeel == kDesktopWindowFeel)
|
if (fFeel == kDesktopWindowFeel)
|
||||||
return first ? first : NextWindow(workspace);
|
return first ? first : NextWindow(workspace);
|
||||||
|
|
||||||
// menu windows are always on top
|
|
||||||
if (fFeel == kMenuWindowFeel)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
if (first == NULL)
|
if (first == NULL)
|
||||||
first = NextWindow(workspace);
|
first = NextWindow(workspace);
|
||||||
|
|
||||||
@@ -1394,10 +1391,6 @@ WindowLayer::Frontmost(WindowLayer* first, int32 workspace)
|
|||||||
if (window->IsHidden() || window == this)
|
if (window->IsHidden() || window == this)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// no one can be in front of a menu window
|
|
||||||
if (window->Feel() == kMenuWindowFeel)
|
|
||||||
return window;
|
|
||||||
|
|
||||||
if (window->HasInSubset(this))
|
if (window->HasInSubset(this))
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
@@ -1426,20 +1419,17 @@ WindowLayer::HasInSubset(const WindowLayer* window) const
|
|||||||
if (fFeel == window->Feel() || fFeel == B_NORMAL_WINDOW_FEEL)
|
if (fFeel == window->Feel() || fFeel == B_NORMAL_WINDOW_FEEL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (fFeel == kMenuWindowFeel)
|
// we have a few special feels that have a fixed order
|
||||||
return true;
|
|
||||||
if (window->Feel() == kMenuWindowFeel)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (fFeel == B_MODAL_ALL_WINDOW_FEEL)
|
const int32 feel[] = {kWindowScreenFeel, kMenuWindowFeel,
|
||||||
return true;
|
B_MODAL_ALL_WINDOW_FEEL, B_FLOATING_ALL_WINDOW_FEEL, 0};
|
||||||
if (window->Feel() == B_MODAL_ALL_WINDOW_FEEL)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (fFeel == B_FLOATING_ALL_WINDOW_FEEL)
|
for (int32 order = 0; feel[order]; order++) {
|
||||||
return true;
|
if (fFeel == feel[order])
|
||||||
if (window->Feel() == B_FLOATING_ALL_WINDOW_FEEL)
|
return true;
|
||||||
return false;
|
if (window->Feel() == feel[order])
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (fFeel == B_FLOATING_APP_WINDOW_FEEL
|
if (fFeel == B_FLOATING_APP_WINDOW_FEEL
|
||||||
|| fFeel == B_MODAL_APP_WINDOW_FEEL)
|
|| fFeel == B_MODAL_APP_WINDOW_FEEL)
|
||||||
|
|||||||
Reference in New Issue
Block a user