* 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.
|
All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "BarWindow.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
#include <FindDirectory.h>
|
#include <FindDirectory.h>
|
||||||
@@ -43,7 +47,6 @@ All rights reserved.
|
|||||||
#include <MessageFilter.h>
|
#include <MessageFilter.h>
|
||||||
#include <Screen.h>
|
#include <Screen.h>
|
||||||
|
|
||||||
#include "BarWindow.h"
|
|
||||||
#include "BarApp.h"
|
#include "BarApp.h"
|
||||||
#include "BarMenuBar.h"
|
#include "BarMenuBar.h"
|
||||||
#include "BarView.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
|
void
|
||||||
TBarWindow::SaveSettings()
|
TBarWindow::SaveSettings()
|
||||||
{
|
{
|
||||||
@@ -406,6 +418,7 @@ TBarWindow::SetDeskbarLocation(deskbar_location location, bool newExpandState)
|
|||||||
fBarView->ChangeState(expand, vertical, left, top);
|
fBarView->ChangeState(expand, vertical, left, top);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TBarWindow::SetLocation(BMessage* message)
|
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.
|
names are registered trademarks or trademarks of their respective holders.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BAR_WINDOW_H
|
#ifndef BAR_WINDOW_H
|
||||||
#define BAR_WINDOW_H
|
#define BAR_WINDOW_H
|
||||||
|
|
||||||
|
|
||||||
#include <Deskbar.h>
|
#include <Deskbar.h>
|
||||||
#include <Window.h>
|
#include <Window.h>
|
||||||
|
|
||||||
|
|
||||||
class TBeMenu;
|
class TBeMenu;
|
||||||
class TBarView;
|
class TBarView;
|
||||||
|
|
||||||
|
|
||||||
class TBarWindow : public BWindow {
|
class TBarWindow : public BWindow {
|
||||||
public:
|
public:
|
||||||
TBarWindow();
|
TBarWindow();
|
||||||
|
|
||||||
virtual void MenusBeginning();
|
virtual void MenusBeginning();
|
||||||
virtual void MenusEnded();
|
virtual void MenusEnded();
|
||||||
virtual bool QuitRequested();
|
virtual bool QuitRequested();
|
||||||
virtual void WorkspaceActivated(int32 ws, bool activate);
|
virtual void WorkspaceActivated(int32 workspace,
|
||||||
virtual void ScreenChanged(BRect size, color_space depth);
|
bool activate);
|
||||||
virtual void DispatchMessage(BMessage* message, BHandler* handler);
|
virtual void ScreenChanged(BRect size, color_space depth);
|
||||||
virtual void MessageReceived(BMessage* m);
|
virtual void DispatchMessage(BMessage* message,
|
||||||
|
BHandler* handler);
|
||||||
|
virtual void MessageReceived(BMessage* message);
|
||||||
|
virtual void Minimize(bool minimize);
|
||||||
|
|
||||||
void SaveSettings();
|
void SaveSettings();
|
||||||
TBarView* BarView() const { return fBarView; };
|
TBarView* BarView() const { return fBarView; };
|
||||||
static void SetBeMenu(TBeMenu* menu);
|
static void SetBeMenu(TBeMenu* menu);
|
||||||
TBeMenu* BeMenu();
|
TBeMenu* BeMenu();
|
||||||
|
|
||||||
void ShowBeMenu();
|
void ShowBeMenu();
|
||||||
void ShowTeamMenu();
|
void ShowTeamMenu();
|
||||||
|
|
||||||
void GetLocation(BMessage*);
|
void GetLocation(BMessage* message);
|
||||||
deskbar_location DeskbarLocation() const;
|
deskbar_location DeskbarLocation() const;
|
||||||
void SetLocation(BMessage*);
|
void SetLocation(BMessage* message);
|
||||||
void SetDeskbarLocation(deskbar_location location,
|
void SetDeskbarLocation(deskbar_location location,
|
||||||
bool expand);
|
bool expand);
|
||||||
|
|
||||||
void IsExpanded(BMessage*);
|
void IsExpanded(BMessage* message);
|
||||||
void Expand(BMessage*);
|
void Expand(BMessage* message);
|
||||||
|
|
||||||
void ItemInfo(BMessage*);
|
void ItemInfo(BMessage* message);
|
||||||
void ItemExists(BMessage*);
|
void ItemExists(BMessage* message);
|
||||||
|
|
||||||
void CountItems(BMessage*);
|
void CountItems(BMessage* message);
|
||||||
|
|
||||||
void AddItem(BMessage*);
|
void AddItem(BMessage* message);
|
||||||
void RemoveItem(BMessage*);
|
void RemoveItem(BMessage* message);
|
||||||
|
|
||||||
void GetIconFrame(BMessage*);
|
void GetIconFrame(BMessage* message);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static TBeMenu *sBeMenu;
|
static TBeMenu* sBeMenu;
|
||||||
TBarView *fBarView;
|
TBarView* fBarView;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* BAR_WINDOW_H */
|
#endif /* BAR_WINDOW_H */
|
||||||
|
|||||||
@@ -401,11 +401,8 @@ ServerWindow::SetTitle(const char* newTitle)
|
|||||||
rename_thread(Thread(), name);
|
rename_thread(Thread(), name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fWindow != NULL) {
|
if (fWindow != NULL)
|
||||||
//fDesktop->UnlockSingleWindow();
|
|
||||||
fDesktop->SetWindowTitle(fWindow, newTitle);
|
fDesktop->SetWindowTitle(fWindow, newTitle);
|
||||||
//fDesktop->LockSingleWindow();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -425,8 +422,7 @@ ServerWindow::NotifyQuitRequested()
|
|||||||
void
|
void
|
||||||
ServerWindow::NotifyMinimize(bool minimize)
|
ServerWindow::NotifyMinimize(bool minimize)
|
||||||
{
|
{
|
||||||
if (fWindow->Feel() != B_NORMAL_WINDOW_FEEL
|
if (fWindow->Feel() != B_NORMAL_WINDOW_FEEL)
|
||||||
|| ((fWindow->Flags() & B_NOT_MINIMIZABLE) == 0 && minimize))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// The client is responsible for the actual minimization
|
// The client is responsible for the actual minimization
|
||||||
|
|||||||
@@ -824,8 +824,10 @@ Window::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case DEC_MINIMIZE:
|
case DEC_MINIMIZE:
|
||||||
fIsMinimizing = true;
|
if ((Flags() & B_NOT_MINIMIZABLE) == 0) {
|
||||||
STRACE_CLICK(("===> DEC_MINIMIZE\n"));
|
fIsMinimizing = true;
|
||||||
|
STRACE_CLICK(("===> DEC_MINIMIZE\n"));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DEC_DRAG:
|
case DEC_DRAG:
|
||||||
|
|||||||
Reference in New Issue
Block a user