From 2031159e73cc6506c6a60f4caec806b852a69e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 2 Dec 2013 19:40:29 +0100 Subject: [PATCH] ActivityMonitor: completes hrev46476 * set the settings window feel to modal when going always on top. * fix the settings window activation when already opened. --- src/apps/activitymonitor/ActivityWindow.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/apps/activitymonitor/ActivityWindow.cpp b/src/apps/activitymonitor/ActivityWindow.cpp index 1a3d07f7b0..449c7752c8 100644 --- a/src/apps/activitymonitor/ActivityWindow.cpp +++ b/src/apps/activitymonitor/ActivityWindow.cpp @@ -196,7 +196,6 @@ ActivityWindow::MessageReceived(BMessage* message) // Just bring the window to front (via scripting) BMessage toFront(B_SET_PROPERTY); toFront.AddSpecifier("Active"); - toFront.AddSpecifier("Window", B_TRANSLATE("Settings")); toFront.AddBool("data", true); fSettingsWindow.SendMessage(&toFront); } else { @@ -256,7 +255,7 @@ ActivityWindow::ActivityViewAt(int32 index) const bool ActivityWindow::IsAlwaysOnTop() const { - return fAlwaysOnTop->IsMarked(); + return fAlwaysOnTop->IsMarked(); } @@ -399,5 +398,11 @@ ActivityWindow::_SetAlwaysOnTop(bool alwaysOnTop) { SetFeel(alwaysOnTop ? B_FLOATING_ALL_WINDOW_FEEL : B_NORMAL_WINDOW_FEEL); fAlwaysOnTop->SetMarked(alwaysOnTop); + if (fSettingsWindow.IsValid() && alwaysOnTop) { + // Change the settings window feel to modal (via scripting) + BMessage toFront(B_SET_PROPERTY); + toFront.AddSpecifier("Feel"); + toFront.AddInt32("data", B_MODAL_ALL_WINDOW_FEEL); + fSettingsWindow.SendMessage(&toFront); + } } -