* Workspace offsets weren't correct (only for the first workspace).
* No longer draws hidden windows. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15450 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -64,15 +64,14 @@ WorkspacesLayer::_WorkspaceAt(int32 i)
|
|||||||
|
|
||||||
BRect rect(column * width, row * height, (column + 1) * width, (row + 1) * height);
|
BRect rect(column * width, row * height, (column + 1) * width, (row + 1) * height);
|
||||||
|
|
||||||
|
rect.OffsetBy(Frame().LeftTop());
|
||||||
|
|
||||||
// make sure there is no gap anywhere
|
// make sure there is no gap anywhere
|
||||||
if (column == columns - 1)
|
if (column == columns - 1)
|
||||||
rect.right = Frame().right;
|
rect.right = Frame().right;
|
||||||
if (row == rows - 1)
|
if (row == rows - 1)
|
||||||
rect.bottom = Frame().bottom;
|
rect.bottom = Frame().bottom;
|
||||||
|
|
||||||
BPoint pt(0,0);
|
|
||||||
ConvertToScreen(&pt);
|
|
||||||
rect.OffsetBy(pt);
|
|
||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,7 +102,7 @@ WorkspacesLayer::_DrawWindow(DrawingEngine* drawingEngine, const BRect& workspac
|
|||||||
const BRect& screenFrame, WindowLayer* window, BPoint windowPosition,
|
const BRect& screenFrame, WindowLayer* window, BPoint windowPosition,
|
||||||
BRegion& backgroundRegion, bool active)
|
BRegion& backgroundRegion, bool active)
|
||||||
{
|
{
|
||||||
if (window->Feel() == kDesktopWindowFeel)
|
if (window->Feel() == kDesktopWindowFeel || window->IsHidden())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BPoint offset = window->Frame().LeftTop() - windowPosition;
|
BPoint offset = window->Frame().LeftTop() - windowPosition;
|
||||||
@@ -305,3 +304,11 @@ WorkspacesLayer::MouseDown(BMessage* message, BPoint where, int32* _viewToken)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
WorkspacesLayer::WindowChanged(WindowLayer* window)
|
||||||
|
{
|
||||||
|
// TODO: be smarter about this!
|
||||||
|
BRegion region(Frame());
|
||||||
|
Window()->MarkContentDirty(region);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ class WorkspacesLayer : public ViewLayer {
|
|||||||
bool deep = false);
|
bool deep = false);
|
||||||
virtual void MouseDown(BMessage* message, BPoint where, int32* _viewToken);
|
virtual void MouseDown(BMessage* message, BPoint where, int32* _viewToken);
|
||||||
|
|
||||||
|
void WindowChanged(WindowLayer* window);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void _GetGrid(int32& columns, int32& rows);
|
void _GetGrid(int32& columns, int32& rows);
|
||||||
BRect _WorkspaceAt(int32 i);
|
BRect _WorkspaceAt(int32 i);
|
||||||
|
|||||||
Reference in New Issue
Block a user