* Moved change_winBorder_feel() into GoChangeWinBorderFeel() and removed the former.
* Renamed GoChangeWinBorderFeel() to ChangeWinBorderFeel(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15114 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -147,15 +147,6 @@ RootLayer::~RootLayer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
RootLayer::GoChangeWinBorderFeel(WinBorder *winBorder, int32 newFeel)
|
|
||||||
{
|
|
||||||
Lock();
|
|
||||||
change_winBorder_feel(winBorder, newFeel);
|
|
||||||
Unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RootLayer::MoveBy(float x, float y)
|
RootLayer::MoveBy(float x, float y)
|
||||||
{
|
{
|
||||||
@@ -664,6 +655,50 @@ RootLayer::ShowWinBorder(WinBorder* winBorder)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
RootLayer::ChangeWinBorderFeel(WinBorder *winBorder, int32 newFeel)
|
||||||
|
{
|
||||||
|
BAutolock _(fAllRegionsLock);
|
||||||
|
|
||||||
|
bool isVisible = false;
|
||||||
|
bool isVisibleInActiveWorkspace = false;
|
||||||
|
|
||||||
|
Workspace::State oldWMState;
|
||||||
|
ActiveWorkspace()->GetState(&oldWMState);
|
||||||
|
|
||||||
|
if (!winBorder->IsHidden()) {
|
||||||
|
isVisible = true;
|
||||||
|
isVisibleInActiveWorkspace = ActiveWorkspace()->HasWinBorder(winBorder);
|
||||||
|
// just hide, don't invalidate
|
||||||
|
winBorder->Hide(false);
|
||||||
|
// all workspaces must be up-to-date with this change of feel.
|
||||||
|
for (int32 i = 0; i < kMaxWorkspaceCount; i++) {
|
||||||
|
if (fWorkspace[i]) {
|
||||||
|
fWorkspace[i]->HideWinBorder(winBorder);
|
||||||
|
fWorkspace[i]->RemoveWinBorder(winBorder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fDesktop->SetWinBorderFeel(winBorder, newFeel);
|
||||||
|
|
||||||
|
if (isVisible) {
|
||||||
|
// just show, don't invalidate
|
||||||
|
winBorder->Show(false);
|
||||||
|
// all workspaces must be up-to-date with this change of feel.
|
||||||
|
for (int32 i = 0; i < kMaxWorkspaceCount; i++) {
|
||||||
|
if (fWorkspace[i]) {
|
||||||
|
fWorkspace[i]->AddWinBorder(winBorder);
|
||||||
|
fWorkspace[i]->ShowWinBorder(winBorder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isVisibleInActiveWorkspace)
|
||||||
|
RevealNewWMState(oldWMState);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RootLayer::RevealNewWMState(Workspace::State &oldWMState)
|
RootLayer::RevealNewWMState(Workspace::State &oldWMState)
|
||||||
{
|
{
|
||||||
@@ -953,48 +988,6 @@ RootLayer::DragMessage(void) const
|
|||||||
// PRIVATE methods
|
// PRIVATE methods
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
RootLayer::change_winBorder_feel(WinBorder *winBorder, int32 newFeel)
|
|
||||||
{
|
|
||||||
bool isVisible = false;
|
|
||||||
bool isVisibleInActiveWorkspace = false;
|
|
||||||
|
|
||||||
Workspace::State oldWMState;
|
|
||||||
ActiveWorkspace()->GetState(&oldWMState);
|
|
||||||
|
|
||||||
if (!winBorder->IsHidden()) {
|
|
||||||
isVisible = true;
|
|
||||||
isVisibleInActiveWorkspace = ActiveWorkspace()->HasWinBorder(winBorder);
|
|
||||||
// just hide, don't invalidate
|
|
||||||
winBorder->Hide(false);
|
|
||||||
// all workspaces must be up-to-date with this change of feel.
|
|
||||||
for (int32 i = 0; i < kMaxWorkspaceCount; i++) {
|
|
||||||
if (fWorkspace[i]) {
|
|
||||||
fWorkspace[i]->HideWinBorder(winBorder);
|
|
||||||
fWorkspace[i]->RemoveWinBorder(winBorder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fDesktop->SetWinBorderFeel(winBorder, newFeel);
|
|
||||||
|
|
||||||
if (isVisible) {
|
|
||||||
// just show, don't invalidate
|
|
||||||
winBorder->Show(false);
|
|
||||||
// all workspaces must be up-to-date with this change of feel.
|
|
||||||
for (int32 i = 0; i < kMaxWorkspaceCount; i++) {
|
|
||||||
if (fWorkspace[i]) {
|
|
||||||
fWorkspace[i]->AddWinBorder(winBorder);
|
|
||||||
fWorkspace[i]->ShowWinBorder(winBorder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isVisibleInActiveWorkspace)
|
|
||||||
RevealNewWMState(oldWMState);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RootLayer::Draw(const BRect &r)
|
RootLayer::Draw(const BRect &r)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public:
|
|||||||
void Unlock() { fAllRegionsLock.Unlock(); }
|
void Unlock() { fAllRegionsLock.Unlock(); }
|
||||||
bool IsLocked() { return fAllRegionsLock.IsLocked(); }
|
bool IsLocked() { return fAllRegionsLock.IsLocked(); }
|
||||||
|
|
||||||
void GoChangeWinBorderFeel(WinBorder *winBorder, int32 newFeel);
|
void ChangeWinBorderFeel(WinBorder *winBorder, int32 newFeel);
|
||||||
|
|
||||||
void MarkForRedraw(const BRegion &dirty);
|
void MarkForRedraw(const BRegion &dirty);
|
||||||
void TriggerRedraw();
|
void TriggerRedraw();
|
||||||
@@ -121,8 +121,6 @@ friend class Desktop;
|
|||||||
void AddSubsetWinBorder(WinBorder *winBorder, WinBorder *toWinBorder);
|
void AddSubsetWinBorder(WinBorder *winBorder, WinBorder *toWinBorder);
|
||||||
void RemoveSubsetWinBorder(WinBorder *winBorder, WinBorder *fromWinBorder);
|
void RemoveSubsetWinBorder(WinBorder *winBorder, WinBorder *fromWinBorder);
|
||||||
|
|
||||||
void change_winBorder_feel(WinBorder *winBorder, int32 newFeel);
|
|
||||||
|
|
||||||
void MouseEventHandler(BMessage *msg);
|
void MouseEventHandler(BMessage *msg);
|
||||||
Layer* _ChildAt(BPoint where);
|
Layer* _ChildAt(BPoint where);
|
||||||
|
|
||||||
|
|||||||
@@ -1364,7 +1364,7 @@ if (rootLayer)
|
|||||||
int32 newFeel;
|
int32 newFeel;
|
||||||
link.Read<int32>(&newFeel);
|
link.Read<int32>(&newFeel);
|
||||||
|
|
||||||
fWinBorder->GetRootLayer()->GoChangeWinBorderFeel(winBorder, newFeel);
|
fWinBorder->GetRootLayer()->ChangeWinBorderFeel(winBorder, newFeel);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AS_SET_ALIGNMENT:
|
case AS_SET_ALIGNMENT:
|
||||||
|
|||||||
Reference in New Issue
Block a user