Activate already showing, possibly unfocused window if Backgrounds gets launched while already running. Small clean-up.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33942 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -27,7 +27,8 @@ class BackgroundsWindow : public BWindow {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool QuitRequested();
|
virtual bool QuitRequested();
|
||||||
virtual void WorkspaceActivated(int32 oldWorkspaces, bool active);
|
virtual void WorkspaceActivated(int32 oldWorkspaces,
|
||||||
|
bool active);
|
||||||
|
|
||||||
BackgroundsView* fBackgroundsView;
|
BackgroundsView* fBackgroundsView;
|
||||||
};
|
};
|
||||||
@@ -36,6 +37,7 @@ class BackgroundsWindow : public BWindow {
|
|||||||
class BackgroundsApplication : public BApplication {
|
class BackgroundsApplication : public BApplication {
|
||||||
public:
|
public:
|
||||||
BackgroundsApplication();
|
BackgroundsApplication();
|
||||||
|
virtual void MessageReceived(BMessage* message);
|
||||||
virtual void RefsReceived(BMessage* message);
|
virtual void RefsReceived(BMessage* message);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -55,6 +57,20 @@ BackgroundsApplication::BackgroundsApplication()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BackgroundsApplication::MessageReceived(BMessage* message)
|
||||||
|
{
|
||||||
|
switch (message->what) {
|
||||||
|
case B_SILENT_RELAUNCH:
|
||||||
|
fWindow->Activate();
|
||||||
|
break;
|
||||||
|
default;
|
||||||
|
BApplication::MessageReceived(message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BackgroundsApplication::RefsReceived(BMessage* message)
|
BackgroundsApplication::RefsReceived(BMessage* message)
|
||||||
{
|
{
|
||||||
@@ -88,6 +104,7 @@ void
|
|||||||
BackgroundsWindow::RefsReceived(BMessage* message)
|
BackgroundsWindow::RefsReceived(BMessage* message)
|
||||||
{
|
{
|
||||||
fBackgroundsView->RefsReceived(message);
|
fBackgroundsView->RefsReceived(message);
|
||||||
|
Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user