mirror of
https://review.haiku-os.org/haiku
synced 2025-02-01 03:06:08 +01:00
* 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:
parent
bde8b9c6e0
commit
5d29bfa5fa
@ -147,15 +147,6 @@ RootLayer::~RootLayer()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
RootLayer::GoChangeWinBorderFeel(WinBorder *winBorder, int32 newFeel)
|
||||
{
|
||||
Lock();
|
||||
change_winBorder_feel(winBorder, newFeel);
|
||||
Unlock();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
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
|
||||
RootLayer::RevealNewWMState(Workspace::State &oldWMState)
|
||||
{
|
||||
@ -953,48 +988,6 @@ RootLayer::DragMessage(void) const
|
||||
// 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
|
||||
RootLayer::Draw(const BRect &r)
|
||||
{
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
void Unlock() { fAllRegionsLock.Unlock(); }
|
||||
bool IsLocked() { return fAllRegionsLock.IsLocked(); }
|
||||
|
||||
void GoChangeWinBorderFeel(WinBorder *winBorder, int32 newFeel);
|
||||
void ChangeWinBorderFeel(WinBorder *winBorder, int32 newFeel);
|
||||
|
||||
void MarkForRedraw(const BRegion &dirty);
|
||||
void TriggerRedraw();
|
||||
@ -121,8 +121,6 @@ friend class Desktop;
|
||||
void AddSubsetWinBorder(WinBorder *winBorder, WinBorder *toWinBorder);
|
||||
void RemoveSubsetWinBorder(WinBorder *winBorder, WinBorder *fromWinBorder);
|
||||
|
||||
void change_winBorder_feel(WinBorder *winBorder, int32 newFeel);
|
||||
|
||||
void MouseEventHandler(BMessage *msg);
|
||||
Layer* _ChildAt(BPoint where);
|
||||
|
||||
|
@ -1364,7 +1364,7 @@ if (rootLayer)
|
||||
int32 newFeel;
|
||||
link.Read<int32>(&newFeel);
|
||||
|
||||
fWinBorder->GetRootLayer()->GoChangeWinBorderFeel(winBorder, newFeel);
|
||||
fWinBorder->GetRootLayer()->ChangeWinBorderFeel(winBorder, newFeel);
|
||||
break;
|
||||
}
|
||||
case AS_SET_ALIGNMENT:
|
||||
|
Loading…
x
Reference in New Issue
Block a user