Minimize window instead of close; Pogger as background app

This commit is contained in:
Jaidyn Ann 2021-03-21 12:28:33 -05:00
parent 956e366e24
commit 66c1e80b99
4 changed files with 16 additions and 1 deletions

View File

@ -84,6 +84,12 @@ App::MessageReceived(BMessage* msg)
fMainWindow->PostMessage(msg);
break;
}
case B_SILENT_RELAUNCH:
{
if (fMainWindow->IsMinimized() == true)
fMainWindow->Minimize(false);
break;
}
default:
{
BApplication::MessageReceived(msg);

View File

@ -85,6 +85,14 @@ MainWindow::MessageReceived(BMessage *msg)
}
bool
MainWindow::QuitRequested()
{
Minimize(true);
return false;
}
void
MainWindow::_InitInterface()
{

View File

@ -18,6 +18,7 @@ public:
~MainWindow();
void MessageReceived(BMessage*);
bool QuitRequested();
private:
void _InitInterface();

View File

@ -5,7 +5,7 @@
resource app_signature "application/x-vnd.Pogger";
resource app_flags B_SINGLE_LAUNCH;
resource app_flags B_SINGLE_LAUNCH | B_BACKGROUND_APP;
resource app_version {
major = 0,