- Make _Windows public.
- Reload all decorators when the decorator has changed in the DecorManager. - Update copyrights. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37801 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,10 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2005, Haiku, Inc.
|
* Copyright (c) 2001-2010, Haiku, Inc.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Author: DarkWyrm <[email protected]>
|
* Author:
|
||||||
|
* DarkWyrm <[email protected]>
|
||||||
|
* Clemens Zeidler <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "DecorManager.h"
|
||||||
|
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
@@ -20,7 +23,7 @@
|
|||||||
#include "Desktop.h"
|
#include "Desktop.h"
|
||||||
#include "DesktopSettings.h"
|
#include "DesktopSettings.h"
|
||||||
#include "ServerConfig.h"
|
#include "ServerConfig.h"
|
||||||
#include "DecorManager.h"
|
#include "Window.h"
|
||||||
|
|
||||||
typedef float get_version(void);
|
typedef float get_version(void);
|
||||||
typedef Decorator* create_decorator(DesktopSettings& desktopSettings, BRect rect,
|
typedef Decorator* create_decorator(DesktopSettings& desktopSettings, BRect rect,
|
||||||
@@ -230,12 +233,13 @@ DecorManager::GetDecorator() const
|
|||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
DecorManager::SetDecorator(int32 index)
|
DecorManager::SetDecorator(int32 index, Desktop* desktop)
|
||||||
{
|
{
|
||||||
DecorInfo* newDecInfo = (DecorInfo*)fDecorList.ItemAt(index);
|
DecorInfo* newDecInfo = (DecorInfo*)fDecorList.ItemAt(index);
|
||||||
|
|
||||||
if (newDecInfo) {
|
if (newDecInfo) {
|
||||||
fCurrentDecor = newDecInfo;
|
fCurrentDecor = newDecInfo;
|
||||||
|
_UpdateWindows(desktop);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -306,3 +310,13 @@ DecorManager::_FindDecor(const char *name)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
DecorManager::_UpdateWindows(Desktop* desktop)
|
||||||
|
{
|
||||||
|
for (int32 i = 0; i < kMaxWorkspaces; i++) {
|
||||||
|
for (Window* window = desktop->Windows(i).LastWindow(); window;
|
||||||
|
window = window->PreviousWindow(i))
|
||||||
|
desktop->ReloadDecorator(window);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,8 +2,11 @@
|
|||||||
* Copyright (c) 2001-2005, Haiku, Inc.
|
* Copyright (c) 2001-2005, Haiku, Inc.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Author: DarkWyrm <[email protected]>
|
* Author:
|
||||||
|
* DarkWyrm <[email protected]>
|
||||||
|
* Clemens Zeidler <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef DECOR_MANAGER_H
|
#ifndef DECOR_MANAGER_H
|
||||||
#define DECOR_MANAGER_H
|
#define DECOR_MANAGER_H
|
||||||
|
|
||||||
@@ -35,7 +38,7 @@ class DecorManager : public BLocker {
|
|||||||
int32 CountDecorators() const;
|
int32 CountDecorators() const;
|
||||||
|
|
||||||
int32 GetDecorator() const;
|
int32 GetDecorator() const;
|
||||||
bool SetDecorator(int32 index);
|
bool SetDecorator(int32 index, Desktop* desktop);
|
||||||
bool SetR5Decorator(int32 value);
|
bool SetR5Decorator(int32 value);
|
||||||
const char* GetDecoratorName(int32 index);
|
const char* GetDecoratorName(int32 index);
|
||||||
|
|
||||||
@@ -47,6 +50,8 @@ class DecorManager : public BLocker {
|
|||||||
void _EmptyList();
|
void _EmptyList();
|
||||||
DecorInfo* _FindDecor(const char *name);
|
DecorInfo* _FindDecor(const char *name);
|
||||||
|
|
||||||
|
void _UpdateWindows(Desktop* desktop);
|
||||||
|
|
||||||
BObjectList<DecorInfo> fDecorList;
|
BObjectList<DecorInfo> fDecorList;
|
||||||
DecorInfo* fCurrentDecor;
|
DecorInfo* fCurrentDecor;
|
||||||
};
|
};
|
||||||
|
|||||||
+49
-30
@@ -8,6 +8,7 @@
|
|||||||
* Axel Dörfler <[email protected]>
|
* Axel Dörfler <[email protected]>
|
||||||
* Andrej Spielmann <[email protected]>
|
* Andrej Spielmann <[email protected]>
|
||||||
* Brecht Machiels <[email protected]>
|
* Brecht Machiels <[email protected]>
|
||||||
|
* Clemens Zeidler <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -393,7 +394,7 @@ Desktop::Init()
|
|||||||
fSettings = new DesktopSettingsPrivate(fServerReadOnlyMemory);
|
fSettings = new DesktopSettingsPrivate(fServerReadOnlyMemory);
|
||||||
|
|
||||||
for (int32 i = 0; i < kMaxWorkspaces; i++) {
|
for (int32 i = 0; i < kMaxWorkspaces; i++) {
|
||||||
_Windows(i).SetIndex(i);
|
Windows(i).SetIndex(i);
|
||||||
fWorkspaces[i].RestoreConfiguration(*fSettings->WorkspacesMessage(i));
|
fWorkspaces[i].RestoreConfiguration(*fSettings->WorkspacesMessage(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1518,7 +1519,7 @@ Desktop::SetWindowFeel(Window* window, window_feel newFeel)
|
|||||||
if (i == fCurrentWorkspace && window->IsVisible())
|
if (i == fCurrentWorkspace && window->IsVisible())
|
||||||
visibleBefore = window->VisibleRegion();
|
visibleBefore = window->VisibleRegion();
|
||||||
|
|
||||||
Window* backmost = window->Backmost(_Windows(i).LastWindow(), i);
|
Window* backmost = window->Backmost(Windows(i).LastWindow(), i);
|
||||||
if (backmost != NULL) {
|
if (backmost != NULL) {
|
||||||
// check if the backmost window is really behind it
|
// check if the backmost window is really behind it
|
||||||
Window* previous = window->PreviousWindow(i);
|
Window* previous = window->PreviousWindow(i);
|
||||||
@@ -1531,13 +1532,13 @@ Desktop::SetWindowFeel(Window* window, window_feel newFeel)
|
|||||||
|
|
||||||
if (previous == NULL) {
|
if (previous == NULL) {
|
||||||
// need to reinsert window before its backmost window
|
// need to reinsert window before its backmost window
|
||||||
_Windows(i).RemoveWindow(window);
|
Windows(i).RemoveWindow(window);
|
||||||
_Windows(i).AddWindow(window, backmost->NextWindow(i));
|
Windows(i).AddWindow(window, backmost->NextWindow(i));
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Window* frontmost = window->Frontmost(_Windows(i).FirstWindow(), i);
|
Window* frontmost = window->Frontmost(Windows(i).FirstWindow(), i);
|
||||||
if (frontmost != NULL) {
|
if (frontmost != NULL) {
|
||||||
// check if the frontmost window is really in front of it
|
// check if the frontmost window is really in front of it
|
||||||
Window* next = window->NextWindow(i);
|
Window* next = window->NextWindow(i);
|
||||||
@@ -1550,8 +1551,8 @@ Desktop::SetWindowFeel(Window* window, window_feel newFeel)
|
|||||||
|
|
||||||
if (next == NULL) {
|
if (next == NULL) {
|
||||||
// need to reinsert window behind its frontmost window
|
// need to reinsert window behind its frontmost window
|
||||||
_Windows(i).RemoveWindow(window);
|
Windows(i).RemoveWindow(window);
|
||||||
_Windows(i).AddWindow(window, frontmost);
|
Windows(i).AddWindow(window, frontmost);
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1899,6 +1900,24 @@ Desktop::RedrawBackground()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
Desktop::ReloadDecorator(Window* window)
|
||||||
|
{
|
||||||
|
AutoWriteLocker _(fWindowLock);
|
||||||
|
|
||||||
|
BRegion oldBorder;
|
||||||
|
window->GetBorderRegion(&oldBorder);
|
||||||
|
|
||||||
|
window->ReloadDecorator();
|
||||||
|
|
||||||
|
BRegion border;
|
||||||
|
window->GetBorderRegion(&border);
|
||||||
|
|
||||||
|
border.Include(&oldBorder);
|
||||||
|
_RebuildAndRedrawAfterWindowChange(window, border);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Desktop::MinimizeApplication(team_id team)
|
Desktop::MinimizeApplication(team_id team)
|
||||||
{
|
{
|
||||||
@@ -2068,14 +2087,14 @@ Desktop::WriteWindowOrder(int32 workspace, BPrivate::LinkSender& sender)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 count = _Windows(workspace).Count();
|
int32 count = Windows(workspace).Count();
|
||||||
|
|
||||||
// write list
|
// write list
|
||||||
|
|
||||||
sender.StartMessage(B_OK);
|
sender.StartMessage(B_OK);
|
||||||
sender.Attach<int32>(count);
|
sender.Attach<int32>(count);
|
||||||
|
|
||||||
for (Window *window = _Windows(workspace).LastWindow(); window != NULL;
|
for (Window *window = Windows(workspace).LastWindow(); window != NULL;
|
||||||
window = window->PreviousWindow(workspace)) {
|
window = window->PreviousWindow(workspace)) {
|
||||||
sender.Attach<int32>(window->ServerWindow()->ServerToken());
|
sender.Attach<int32>(window->ServerWindow()->ServerToken());
|
||||||
}
|
}
|
||||||
@@ -2118,7 +2137,7 @@ Desktop::WriteApplicationOrder(int32 workspace, BPrivate::LinkSender& sender)
|
|||||||
|
|
||||||
int32 count = 0;
|
int32 count = 0;
|
||||||
|
|
||||||
for (Window *window = _Windows(workspace).LastWindow(); window != NULL;
|
for (Window *window = Windows(workspace).LastWindow(); window != NULL;
|
||||||
window = window->PreviousWindow(workspace)) {
|
window = window->PreviousWindow(workspace)) {
|
||||||
team_id team = window->ServerWindow()->ClientTeam();
|
team_id team = window->ServerWindow()->ClientTeam();
|
||||||
if (count > 1) {
|
if (count > 1) {
|
||||||
@@ -2427,7 +2446,7 @@ Desktop::CurrentWindows()
|
|||||||
|
|
||||||
|
|
||||||
WindowList&
|
WindowList&
|
||||||
Desktop::_Windows(int32 index)
|
Desktop::Windows(int32 index)
|
||||||
{
|
{
|
||||||
return fWorkspaces[index].Windows();
|
return fWorkspaces[index].Windows();
|
||||||
}
|
}
|
||||||
@@ -2452,18 +2471,18 @@ Desktop::_UpdateFloating(int32 previousWorkspace, int32 nextWorkspace,
|
|||||||
if (fFront != NULL && fFront->IsNormal()
|
if (fFront != NULL && fFront->IsNormal()
|
||||||
&& floating->HasInSubset(fFront)) {
|
&& floating->HasInSubset(fFront)) {
|
||||||
// is now visible
|
// is now visible
|
||||||
if (_Windows(previousWorkspace).HasWindow(floating)
|
if (Windows(previousWorkspace).HasWindow(floating)
|
||||||
&& previousWorkspace != nextWorkspace
|
&& previousWorkspace != nextWorkspace
|
||||||
&& !floating->InSubsetWorkspace(previousWorkspace)) {
|
&& !floating->InSubsetWorkspace(previousWorkspace)) {
|
||||||
// but no longer on the previous workspace
|
// but no longer on the previous workspace
|
||||||
_Windows(previousWorkspace).RemoveWindow(floating);
|
Windows(previousWorkspace).RemoveWindow(floating);
|
||||||
floating->SetCurrentWorkspace(-1);
|
floating->SetCurrentWorkspace(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_Windows(nextWorkspace).HasWindow(floating)) {
|
if (!Windows(nextWorkspace).HasWindow(floating)) {
|
||||||
// but wasn't before
|
// but wasn't before
|
||||||
_Windows(nextWorkspace).AddWindow(floating,
|
Windows(nextWorkspace).AddWindow(floating,
|
||||||
floating->Frontmost(_Windows(nextWorkspace).FirstWindow(),
|
floating->Frontmost(Windows(nextWorkspace).FirstWindow(),
|
||||||
nextWorkspace));
|
nextWorkspace));
|
||||||
floating->SetCurrentWorkspace(nextWorkspace);
|
floating->SetCurrentWorkspace(nextWorkspace);
|
||||||
if (mouseEventWindow != fFront)
|
if (mouseEventWindow != fFront)
|
||||||
@@ -2472,11 +2491,11 @@ Desktop::_UpdateFloating(int32 previousWorkspace, int32 nextWorkspace,
|
|||||||
// TODO: put the floating last in the floating window list to
|
// TODO: put the floating last in the floating window list to
|
||||||
// preserve the on screen window order
|
// preserve the on screen window order
|
||||||
}
|
}
|
||||||
} else if (_Windows(previousWorkspace).HasWindow(floating)
|
} else if (Windows(previousWorkspace).HasWindow(floating)
|
||||||
&& !floating->InSubsetWorkspace(previousWorkspace)) {
|
&& !floating->InSubsetWorkspace(previousWorkspace)) {
|
||||||
// was visible, but is no longer
|
// was visible, but is no longer
|
||||||
|
|
||||||
_Windows(previousWorkspace).RemoveWindow(floating);
|
Windows(previousWorkspace).RemoveWindow(floating);
|
||||||
floating->SetCurrentWorkspace(-1);
|
floating->SetCurrentWorkspace(-1);
|
||||||
_HideWindow(floating);
|
_HideWindow(floating);
|
||||||
|
|
||||||
@@ -2710,7 +2729,7 @@ Desktop::_ChangeWindowWorkspaces(Window* window, uint32 oldWorkspaces,
|
|||||||
if (workspace_in_workspaces(i, oldWorkspaces)) {
|
if (workspace_in_workspaces(i, oldWorkspaces)) {
|
||||||
// window is on this workspace, is it anymore?
|
// window is on this workspace, is it anymore?
|
||||||
if (!workspace_in_workspaces(i, newWorkspaces)) {
|
if (!workspace_in_workspaces(i, newWorkspaces)) {
|
||||||
_Windows(i).RemoveWindow(window);
|
Windows(i).RemoveWindow(window);
|
||||||
if (fLastWorkspaceFocus[i] == window)
|
if (fLastWorkspaceFocus[i] == window)
|
||||||
fLastWorkspaceFocus[i] = NULL;
|
fLastWorkspaceFocus[i] = NULL;
|
||||||
|
|
||||||
@@ -2725,8 +2744,8 @@ Desktop::_ChangeWindowWorkspaces(Window* window, uint32 oldWorkspaces,
|
|||||||
} else {
|
} else {
|
||||||
// window was not on this workspace, is it now?
|
// window was not on this workspace, is it now?
|
||||||
if (workspace_in_workspaces(i, newWorkspaces)) {
|
if (workspace_in_workspaces(i, newWorkspaces)) {
|
||||||
_Windows(i).AddWindow(window,
|
Windows(i).AddWindow(window,
|
||||||
window->Frontmost(_Windows(i).FirstWindow(), i));
|
window->Frontmost(Windows(i).FirstWindow(), i));
|
||||||
|
|
||||||
if (i == CurrentWorkspace()) {
|
if (i == CurrentWorkspace()) {
|
||||||
// make the window visible in current workspace
|
// make the window visible in current workspace
|
||||||
@@ -3155,9 +3174,9 @@ Desktop::_SetWorkspace(int32 index, bool moveFocusWindow)
|
|||||||
// But only normal windows are following
|
// But only normal windows are following
|
||||||
uint32 oldWorkspaces = movedWindow->Workspaces();
|
uint32 oldWorkspaces = movedWindow->Workspaces();
|
||||||
|
|
||||||
_Windows(previousIndex).RemoveWindow(movedWindow);
|
Windows(previousIndex).RemoveWindow(movedWindow);
|
||||||
_Windows(index).AddWindow(movedWindow,
|
Windows(index).AddWindow(movedWindow,
|
||||||
movedWindow->Frontmost(_Windows(index).FirstWindow(),
|
movedWindow->Frontmost(Windows(index).FirstWindow(),
|
||||||
index));
|
index));
|
||||||
|
|
||||||
// TODO: subset windows will always flicker this way
|
// TODO: subset windows will always flicker this way
|
||||||
@@ -3170,9 +3189,9 @@ Desktop::_SetWorkspace(int32 index, bool moveFocusWindow)
|
|||||||
InvokeSetWindowWorkspaces(movedWindow, movedWindow->Workspaces());
|
InvokeSetWindowWorkspaces(movedWindow, movedWindow->Workspaces());
|
||||||
} else {
|
} else {
|
||||||
// make sure it's frontmost
|
// make sure it's frontmost
|
||||||
_Windows(index).RemoveWindow(movedWindow);
|
Windows(index).RemoveWindow(movedWindow);
|
||||||
_Windows(index).AddWindow(movedWindow,
|
Windows(index).AddWindow(movedWindow,
|
||||||
movedWindow->Frontmost(_Windows(index).FirstWindow(),
|
movedWindow->Frontmost(Windows(index).FirstWindow(),
|
||||||
index));
|
index));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3223,7 +3242,7 @@ Desktop::_SetWorkspace(int32 index, bool moveFocusWindow)
|
|||||||
WindowList windows(kWorkingList);
|
WindowList windows(kWorkingList);
|
||||||
BList previousRegions;
|
BList previousRegions;
|
||||||
|
|
||||||
for (Window* window = _Windows(index).FirstWindow();
|
for (Window* window = Windows(index).FirstWindow();
|
||||||
window != NULL; window = window->NextWindow(index)) {
|
window != NULL; window = window->NextWindow(index)) {
|
||||||
BPoint position = window->Anchor(index).position;
|
BPoint position = window->Anchor(index).position;
|
||||||
|
|
||||||
@@ -3277,7 +3296,7 @@ Desktop::_SetWorkspace(int32 index, bool moveFocusWindow)
|
|||||||
_RebuildClippingForAllWindows(stillAvailableOnScreen);
|
_RebuildClippingForAllWindows(stillAvailableOnScreen);
|
||||||
_SetBackground(stillAvailableOnScreen);
|
_SetBackground(stillAvailableOnScreen);
|
||||||
|
|
||||||
for (Window* window = _Windows(index).FirstWindow(); window != NULL;
|
for (Window* window = Windows(index).FirstWindow(); window != NULL;
|
||||||
window = window->NextWindow(index)) {
|
window = window->NextWindow(index)) {
|
||||||
// send B_WORKSPACE_ACTIVATED message
|
// send B_WORKSPACE_ACTIVATED message
|
||||||
window->WorkspaceActivated(index, true);
|
window->WorkspaceActivated(index, true);
|
||||||
@@ -3313,7 +3332,7 @@ Desktop::_SetWorkspace(int32 index, bool moveFocusWindow)
|
|||||||
// Set new focus, but keep focus to a floating window if still visible
|
// Set new focus, but keep focus to a floating window if still visible
|
||||||
if (movedWindow != NULL)
|
if (movedWindow != NULL)
|
||||||
SetFocusWindow(movedWindow);
|
SetFocusWindow(movedWindow);
|
||||||
else if (!_Windows(index).HasWindow(FocusWindow())
|
else if (!Windows(index).HasWindow(FocusWindow())
|
||||||
|| (FocusWindow() != NULL && !FocusWindow()->IsFloating()))
|
|| (FocusWindow() != NULL && !FocusWindow()->IsFloating()))
|
||||||
SetFocusWindow(fLastWorkspaceFocus[index]);
|
SetFocusWindow(fLastWorkspaceFocus[index]);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2009, Haiku.
|
* Copyright 2001-2010, Haiku.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
* Axel Dörfler <axeld@pinc-software.de>
|
* Axel Dörfler <axeld@pinc-software.de>
|
||||||
* Andrej Spielmann, <andrej.spielmann@seh.ox.ac.uk>
|
* Andrej Spielmann, <andrej.spielmann@seh.ox.ac.uk>
|
||||||
* Brecht Machiels <brecht@mos6581.org>
|
* Brecht Machiels <brecht@mos6581.org>
|
||||||
|
* Clemens Zeidler <haiku@clemens-zeidler.de>
|
||||||
*/
|
*/
|
||||||
#ifndef DESKTOP_H
|
#ifndef DESKTOP_H
|
||||||
#define DESKTOP_H
|
#define DESKTOP_H
|
||||||
@@ -232,6 +233,8 @@ public:
|
|||||||
void Redraw();
|
void Redraw();
|
||||||
void RedrawBackground();
|
void RedrawBackground();
|
||||||
|
|
||||||
|
void ReloadDecorator(Window* window);
|
||||||
|
|
||||||
BRegion& BackgroundRegion()
|
BRegion& BackgroundRegion()
|
||||||
{ return fBackgroundRegion; }
|
{ return fBackgroundRegion; }
|
||||||
|
|
||||||
@@ -249,6 +252,7 @@ public:
|
|||||||
BPrivate::LinkSender& sender);
|
BPrivate::LinkSender& sender);
|
||||||
|
|
||||||
WindowList& CurrentWindows();
|
WindowList& CurrentWindows();
|
||||||
|
WindowList& Windows(int32 index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void _LaunchInputServer();
|
void _LaunchInputServer();
|
||||||
@@ -257,8 +261,6 @@ private:
|
|||||||
void _DispatchMessage(int32 code,
|
void _DispatchMessage(int32 code,
|
||||||
BPrivate::LinkReceiver &link);
|
BPrivate::LinkReceiver &link);
|
||||||
|
|
||||||
WindowList& _Windows(int32 index);
|
|
||||||
|
|
||||||
void _UpdateFloating(int32 previousWorkspace = -1,
|
void _UpdateFloating(int32 previousWorkspace = -1,
|
||||||
int32 nextWorkspace = -1,
|
int32 nextWorkspace = -1,
|
||||||
Window* mouseEventWindow = NULL);
|
Window* mouseEventWindow = NULL);
|
||||||
|
|||||||
@@ -625,7 +625,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
|
|||||||
|
|
||||||
int32 index;
|
int32 index;
|
||||||
link.Read<int32>(&index);
|
link.Read<int32>(&index);
|
||||||
if (gDecorManager.SetDecorator(index))
|
if (gDecorManager.SetDecorator(index, fDesktop))
|
||||||
fDesktop->BroadcastToAllApps(AS_UPDATE_DECORATOR);
|
fDesktop->BroadcastToAllApps(AS_UPDATE_DECORATOR);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -542,6 +542,20 @@ Window::PreviousWindow(int32 index) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
Window::ReloadDecorator()
|
||||||
|
{
|
||||||
|
if (fLook != B_NO_BORDER_WINDOW_LOOK) {
|
||||||
|
delete fDecorator;
|
||||||
|
// we need a new decorator
|
||||||
|
fDecorator = gDecorManager.AllocateDecorator(fDesktop, fDrawingEngine,
|
||||||
|
Frame(), Title(), fLook, fFlags);
|
||||||
|
if (IsFocus())
|
||||||
|
fDecorator->SetFocus(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Window::SetScreen(const ::Screen* screen)
|
Window::SetScreen(const ::Screen* screen)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ public:
|
|||||||
::EventTarget& EventTarget() const
|
::EventTarget& EventTarget() const
|
||||||
{ return fWindow->EventTarget(); }
|
{ return fWindow->EventTarget(); }
|
||||||
|
|
||||||
|
void ReloadDecorator();
|
||||||
|
|
||||||
void SetScreen(const ::Screen* screen);
|
void SetScreen(const ::Screen* screen);
|
||||||
const ::Screen* Screen() const;
|
const ::Screen* Screen() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user