This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.
The branch, next has been updated
via b657f15344f193d70747689f96cefddc8baa2181 (commit)
from fd9bb936aa9379c27ba3bbf0c1fdb6c0ed1626cc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/b657f15344f193d70747689f96cefddc8baa2181
commit b657f15344f193d70747689f96cefddc8baa2181
Author: Iain Patterson <[email protected]>
Date: Fri Nov 9 14:39:57 2012 -0800
Maximized windows appear misplaced
Bug report from nikty:
"Window Maker does remember the size of windows, but for maximized windows
it does not keep the position.
When a maximized window appears it is shifted to the right for a few pixels
(firefox, thunar) or both to the right and to the bottom (openoffice, vlc,
virtualbox)."
We weren't accounting for the window border when calculating whether the
window would position correctly.
To reproduce:
* Launch some application which remembers its position. I used
Thunar as suggested in the bug report.
* Maximize!
* Kill the application.
* Launch it again.
* Maximize! The expected behaviour is that nothing would happen
because the window should have started right where it was before.
Observed behaviour is that it moves a few pixels.
After the patch we can verify that the maximize operation is
idempotent with regards to geometry.
Tested with and without Xinerama, with and without a panel strutting
one edge.
Bug report: http://www.kix.es/mantis/view.php?id=4
diff --git a/src/window.c b/src/window.c
index 199613c..9970c1a 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1144,6 +1144,29 @@ WWindow *wManageWindow(WScreen *scr, Window window)
y -= wwin->frame->top_width + wwin->frame->bottom_width;
}
+ /* wWindowConfigure() will account for the window border
+ * when placing so the window would be shifted without
+ * the adjustment below
+ */
+ if (HAS_BORDER(wwin)) {
+ WMRect rect;
+ WArea usableArea;
+ int head;
+
+ rect.pos.x = x;
+ rect.pos.y = y;
+ rect.size.width = 1;
+ rect.size.height = 1;
+
+ head = wGetHeadForRect(scr, rect);
+ usableArea = wGetUsableAreaForHead(scr, head, NULL, True);
+
+ if (x >= usableArea.x1 + 2 * FRAME_BORDER_WIDTH)
+ x -= 2 * FRAME_BORDER_WIDTH;
+ if (y >= usableArea.y1 + 2 * FRAME_BORDER_WIDTH)
+ y -= 2 * FRAME_BORDER_WIDTH;
+ }
+
/*
* wWindowConfigure() will init the client window's size
* (wwin->client.{width,height}) and all other geometry
-----------------------------------------------------------------------
Summary of changes:
src/window.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")
--
To unsubscribe, send mail to [email protected].