* Removed (incorrect) check in ServerWindow::NotifyMinimize() for
B_NOT_MINIMIZABLE; it should still be possible to hide an application programmatically. * The decorators now honor this flag, though. * And the Deskbar overrides BWindow::Minimize() to ignore all minimize requests. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34404 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -32,7 +32,11 @@ names are registered trademarks or trademarks of their respective holders.
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
#include "BarWindow.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <Application.h>
|
||||
#include <Directory.h>
|
||||
#include <FindDirectory.h>
|
||||
@@ -43,7 +47,6 @@ All rights reserved.
|
||||
#include <MessageFilter.h>
|
||||
#include <Screen.h>
|
||||
|
||||
#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)
|
||||
{
|
||||
|
||||
@@ -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 <Deskbar.h>
|
||||
#include <Window.h>
|
||||
|
||||
|
||||
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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user