* Added a new window feel kPasswordWindowFeel that is above all other feels.

* Changed the password window to use this feel.
* Later, the screen saver itself should use this feel whenever the password
  mode is enabled. The password window should then use a modal-app feel, but
  this doesn't work yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28281 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-10-22 11:51:23 +00:00
parent 18ad0f1b8a
commit 89b1afd16c
3 changed files with 11 additions and 7 deletions
@@ -19,6 +19,7 @@ const window_look kLeftTitledWindowLook = window_look(25);
const window_feel kDesktopWindowFeel = window_feel(1024);
const window_feel kMenuWindowFeel = window_feel(1025);
const window_feel kWindowScreenFeel = window_feel(1026);
const window_feel kPasswordWindowFeel = window_feel(1027);
/* Private window types */
+2 -1
View File
@@ -21,7 +21,8 @@
PasswordWindow::PasswordWindow()
: BWindow(BRect(100, 100, 400, 230), "Enter Password",
B_NO_BORDER_WINDOW_LOOK, kWindowScreenFeel /* TODO: should be B_MODAL_APP_WINDOW_FEEL*/,
B_NO_BORDER_WINDOW_LOOK, kPasswordWindowFeel
/* TODO: B_MODAL_APP_WINDOW_FEEL should also behave correctly */,
B_NOT_MOVABLE | B_NOT_CLOSABLE |B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE
| B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS, B_ALL_WORKSPACES)
{
+8 -6
View File
@@ -1539,13 +1539,14 @@ Window::HasInSubset(const Window* window) const
// we have a few special feels that have a fixed order
const int32 feel[] = {kWindowScreenFeel, B_MODAL_ALL_WINDOW_FEEL,
B_FLOATING_ALL_WINDOW_FEEL, 0};
const int32 kFeels[] = {kPasswordWindowFeel, kWindowScreenFeel,
B_MODAL_ALL_WINDOW_FEEL, B_FLOATING_ALL_WINDOW_FEEL, 0};
for (int32 order = 0; feel[order]; order++) {
if (fFeel == feel[order])
for (uint32 order = 0;
order < sizeof(kFeels) / sizeof(kFeels[0]); order++) {
if (fFeel == kFeels[order])
return true;
if (window->Feel() == feel[order])
if (window->Feel() == kFeels[order])
return false;
}
@@ -1666,7 +1667,8 @@ Window::IsValidFeel(window_feel feel)
|| feel == B_FLOATING_ALL_WINDOW_FEEL
|| feel == kDesktopWindowFeel
|| feel == kMenuWindowFeel
|| feel == kWindowScreenFeel;
|| feel == kWindowScreenFeel
|| feel == kPasswordWindowFeel;
}