diff --git a/src/apps/deskbar/BarWindow.cpp b/src/apps/deskbar/BarWindow.cpp index 854d462e4c..f5d88d9bd8 100644 --- a/src/apps/deskbar/BarWindow.cpp +++ b/src/apps/deskbar/BarWindow.cpp @@ -32,7 +32,11 @@ names are registered trademarks or trademarks of their respective holders. All rights reserved. */ + +#include "BarWindow.h" + #include + #include #include #include @@ -43,7 +47,6 @@ All rights reserved. #include #include -#include "BarWindow.h" #include "BarApp.h" #include "BarMenuBar.h" #include "BarView.h" @@ -223,6 +226,15 @@ TBarWindow::MessageReceived(BMessage* message) } +void +TBarWindow::Minimize(bool minimize) +{ + // Don't allow the Deskbar to be minimized + if (!minimize) + BWindow::Minimize(false); +} + + void TBarWindow::SaveSettings() { @@ -406,6 +418,7 @@ TBarWindow::SetDeskbarLocation(deskbar_location location, bool newExpandState) fBarView->ChangeState(expand, vertical, left, top); } + void TBarWindow::SetLocation(BMessage* message) { diff --git a/src/apps/deskbar/BarWindow.h b/src/apps/deskbar/BarWindow.h index 7847962923..d972f5ef57 100644 --- a/src/apps/deskbar/BarWindow.h +++ b/src/apps/deskbar/BarWindow.h @@ -31,58 +31,63 @@ of Be Incorporated in the United States and other countries. Other brand product names are registered trademarks or trademarks of their respective holders. All rights reserved. */ - #ifndef BAR_WINDOW_H #define BAR_WINDOW_H + #include #include + class TBeMenu; class TBarView; + class TBarWindow : public BWindow { - public: - TBarWindow(); +public: + TBarWindow(); - virtual void MenusBeginning(); - virtual void MenusEnded(); - virtual bool QuitRequested(); - virtual void WorkspaceActivated(int32 ws, bool activate); - virtual void ScreenChanged(BRect size, color_space depth); - virtual void DispatchMessage(BMessage* message, BHandler* handler); - virtual void MessageReceived(BMessage* m); + virtual void MenusBeginning(); + virtual void MenusEnded(); + virtual bool QuitRequested(); + virtual void WorkspaceActivated(int32 workspace, + bool activate); + virtual void ScreenChanged(BRect size, color_space depth); + virtual void DispatchMessage(BMessage* message, + BHandler* handler); + virtual void MessageReceived(BMessage* message); + virtual void Minimize(bool minimize); - void SaveSettings(); - TBarView* BarView() const { return fBarView; }; - static void SetBeMenu(TBeMenu* menu); - TBeMenu* BeMenu(); + void SaveSettings(); + TBarView* BarView() const { return fBarView; }; + static void SetBeMenu(TBeMenu* menu); + TBeMenu* BeMenu(); - void ShowBeMenu(); - void ShowTeamMenu(); + void ShowBeMenu(); + void ShowTeamMenu(); - void GetLocation(BMessage*); - deskbar_location DeskbarLocation() const; - void SetLocation(BMessage*); - void SetDeskbarLocation(deskbar_location location, - bool expand); - - void IsExpanded(BMessage*); - void Expand(BMessage*); - - void ItemInfo(BMessage*); - void ItemExists(BMessage*); - - void CountItems(BMessage*); - - void AddItem(BMessage*); - void RemoveItem(BMessage*); - - void GetIconFrame(BMessage*); + void GetLocation(BMessage* message); + deskbar_location DeskbarLocation() const; + void SetLocation(BMessage* message); + void SetDeskbarLocation(deskbar_location location, + bool expand); + + void IsExpanded(BMessage* message); + void Expand(BMessage* message); + + void ItemInfo(BMessage* message); + void ItemExists(BMessage* message); + + void CountItems(BMessage* message); + + void AddItem(BMessage* message); + void RemoveItem(BMessage* message); + + void GetIconFrame(BMessage* message); private: - static TBeMenu *sBeMenu; - TBarView *fBarView; + static TBeMenu* sBeMenu; + TBarView* fBarView; }; #endif /* BAR_WINDOW_H */ diff --git a/src/servers/app/ServerWindow.cpp b/src/servers/app/ServerWindow.cpp index ad6e107b0c..7a72b9c229 100644 --- a/src/servers/app/ServerWindow.cpp +++ b/src/servers/app/ServerWindow.cpp @@ -401,11 +401,8 @@ ServerWindow::SetTitle(const char* newTitle) rename_thread(Thread(), name); } - if (fWindow != NULL) { -//fDesktop->UnlockSingleWindow(); + if (fWindow != NULL) fDesktop->SetWindowTitle(fWindow, newTitle); -//fDesktop->LockSingleWindow(); - } } @@ -425,8 +422,7 @@ ServerWindow::NotifyQuitRequested() void ServerWindow::NotifyMinimize(bool minimize) { - if (fWindow->Feel() != B_NORMAL_WINDOW_FEEL - || ((fWindow->Flags() & B_NOT_MINIMIZABLE) == 0 && minimize)) + if (fWindow->Feel() != B_NORMAL_WINDOW_FEEL) return; // The client is responsible for the actual minimization diff --git a/src/servers/app/Window.cpp b/src/servers/app/Window.cpp index 3d434542ba..2c30f862f0 100644 --- a/src/servers/app/Window.cpp +++ b/src/servers/app/Window.cpp @@ -824,8 +824,10 @@ Window::MouseDown(BMessage* message, BPoint where, int32* _viewToken) break; case DEC_MINIMIZE: - fIsMinimizing = true; - STRACE_CLICK(("===> DEC_MINIMIZE\n")); + if ((Flags() & B_NOT_MINIMIZABLE) == 0) { + fIsMinimizing = true; + STRACE_CLICK(("===> DEC_MINIMIZE\n")); + } break; case DEC_DRAG: