* make use of the now available decorator infos
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29065 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -641,7 +641,7 @@ ScreenshotWindow::_GetActiveWindowFrame(BRect* frame)
|
|||||||
|
|
||||||
int32* tokens;
|
int32* tokens;
|
||||||
int32 tokenCount;
|
int32 tokenCount;
|
||||||
status_t status = BPrivate::get_window_order(B_CURRENT_WORKSPACE, &tokens,
|
status_t status = BPrivate::get_window_order(current_workspace(), &tokens,
|
||||||
&tokenCount);
|
&tokenCount);
|
||||||
if (status != B_OK || !tokens || tokenCount < 1)
|
if (status != B_OK || !tokens || tokenCount < 1)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
@@ -656,14 +656,12 @@ ScreenshotWindow::_GetActiveWindowFrame(BRect* frame)
|
|||||||
frame->bottom = windowInfo->window_bottom;
|
frame->bottom = windowInfo->window_bottom;
|
||||||
|
|
||||||
status = B_OK;
|
status = B_OK;
|
||||||
free(windowInfo);
|
|
||||||
|
|
||||||
if (fIncludeBorder) {
|
if (fIncludeBorder) {
|
||||||
// TODO: that's wrong for windows without titlebar, change once
|
float border = (windowInfo->border_size);
|
||||||
// we can access the decorator or get it via window info
|
frame->InsetBy(-(border), -(border));
|
||||||
frame->InsetBy(-5.0, -5.0);
|
frame->top -= windowInfo->tab_height;
|
||||||
frame->top -= 22.0;
|
|
||||||
}
|
}
|
||||||
|
free(windowInfo);
|
||||||
|
|
||||||
BRect screenFrame(BScreen(this).Frame());
|
BRect screenFrame(BScreen(this).Frame());
|
||||||
if (frame->left < screenFrame.left)
|
if (frame->left < screenFrame.left)
|
||||||
|
|||||||
Reference in New Issue
Block a user