Decorator() can be NULL in case the look is B_NO_BORDER_WINDOW_LOOK. Fixes bug 204
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16458 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -108,12 +108,18 @@ WorkspacesLayer::_DrawWindow(DrawingEngine* drawingEngine, const BRect& workspac
|
|||||||
BPoint offset = window->Frame().LeftTop() - windowPosition;
|
BPoint offset = window->Frame().LeftTop() - windowPosition;
|
||||||
BRect frame = _WindowFrame(workspaceFrame, screenFrame, window->Frame(),
|
BRect frame = _WindowFrame(workspaceFrame, screenFrame, window->Frame(),
|
||||||
windowPosition);
|
windowPosition);
|
||||||
BRect tabFrame = window->Decorator()->TabRect();
|
Decorator *decorator = window->Decorator();
|
||||||
|
BRect tabFrame(0, 0, 0, 0);
|
||||||
|
if (decorator != NULL)
|
||||||
|
tabFrame = decorator->TabRect();
|
||||||
|
|
||||||
tabFrame = _WindowFrame(workspaceFrame, screenFrame,
|
tabFrame = _WindowFrame(workspaceFrame, screenFrame,
|
||||||
tabFrame, tabFrame.LeftTop() - offset);
|
tabFrame, tabFrame.LeftTop() - offset);
|
||||||
|
|
||||||
// ToDo: let decorator do this!
|
// ToDo: let decorator do this!
|
||||||
RGBColor yellow = window->Decorator()->Colors().window_tab;
|
RGBColor yellow;
|
||||||
|
if (decorator != NULL)
|
||||||
|
yellow = decorator->Colors().window_tab;
|
||||||
RGBColor gray(180, 180, 180);
|
RGBColor gray(180, 180, 180);
|
||||||
RGBColor white(255, 255, 255);
|
RGBColor white(255, 255, 255);
|
||||||
|
|
||||||
@@ -134,6 +140,7 @@ WorkspacesLayer::_DrawWindow(DrawingEngine* drawingEngine, const BRect& workspac
|
|||||||
backgroundRegion.Exclude(tabFrame);
|
backgroundRegion.Exclude(tabFrame);
|
||||||
backgroundRegion.Exclude(frame);
|
backgroundRegion.Exclude(frame);
|
||||||
|
|
||||||
|
if (decorator != NULL)
|
||||||
drawingEngine->StrokeLine(tabFrame.LeftTop(), tabFrame.RightBottom(), yellow);
|
drawingEngine->StrokeLine(tabFrame.LeftTop(), tabFrame.RightBottom(), yellow);
|
||||||
|
|
||||||
drawingEngine->StrokeRect(frame, gray);
|
drawingEngine->StrokeRect(frame, gray);
|
||||||
|
|||||||
Reference in New Issue
Block a user