mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-09 23:34:14 +01:00
- Fixed WMGetViewScreenPosition() to consider the window decorations.
This commit is contained in:
@@ -10,6 +10,7 @@ Changes since wmaker 0.80.0:
|
||||
- rewrote WMBox to use a WMArray for subviews. with this change fixed a bug
|
||||
about arranging subviews after removing one and a memleak occuring in the
|
||||
same case.
|
||||
- Fixed WMGetViewScreenPosition() to consider the window decorations.
|
||||
|
||||
|
||||
Changes since wmaker 0.70.0:
|
||||
|
||||
@@ -724,12 +724,22 @@ WMGetViewScreenPosition(WMView *view)
|
||||
{
|
||||
WMScreen *scr = W_VIEW_SCREEN(view);
|
||||
Window foo;
|
||||
int x, y;
|
||||
|
||||
int x, y, topX, topY, bar;
|
||||
WMView *topView;
|
||||
|
||||
topView = view;
|
||||
while (topView->parent && topView->parent!=scr->rootView)
|
||||
topView = topView->parent;
|
||||
|
||||
if (!XGetGeometry(scr->display, W_VIEW_DRAWABLE(topView), &foo, &topX,
|
||||
&topY, &bar, &bar, &bar, &bar)) {
|
||||
topX = topY = 0;
|
||||
}
|
||||
|
||||
XTranslateCoordinates(scr->display, W_VIEW_DRAWABLE(view),
|
||||
scr->rootWin, 0, 0, &x, &y, &foo);
|
||||
|
||||
return wmkpoint(x, y);
|
||||
|
||||
return wmkpoint(x-topX, y-topY);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user