[Xfce4-commits] [xfce/xfwm4] 01/05: Fix resize with partial struts
noreply at xfce.org
noreply at xfce.org
Mon Jan 5 22:13:20 CET 2015
This is an automated email from the git hooks/post-receive script.
olivier pushed a commit to branch master
in repository xfce/xfwm4.
commit b97b14868e27e48d4d475ac0497726f16de9a4e1
Author: Simon P <iskra42463 at bigmir.net>
Date: Sat Jan 3 11:48:09 2015 +0100
Fix resize with partial struts
Bug: 10951
Make sure the window title remains visible using partial struts.
---
src/moveresize.c | 51 ++++++---------------------------------------------
1 file changed, 6 insertions(+), 45 deletions(-)
diff --git a/src/moveresize.c b/src/moveresize.c
index 384dc37..57e9bb9 100644
--- a/src/moveresize.c
+++ b/src/moveresize.c
@@ -1545,51 +1545,12 @@ clientResizeEventFilter (XEvent * xevent, gpointer data)
frame_y = frameExtentY (c);
}
- if (move_top)
- {
- if ((c->y > MAX (disp_max_y - min_visible, screen_info->height - screen_info->margins [STRUTS_BOTTOM] - min_visible))
- || (!clientCheckTitle (c) && (frame_y < screen_info->margins [STRUTS_TOP])))
- {
- temp = c->y + c->height;
- c->y = CLAMP (c->y, screen_info->margins [STRUTS_TOP] + frame_top,
- MAX (disp_max_y - min_visible, screen_info->height - screen_info->margins [STRUTS_BOTTOM] - min_visible));
- clientSetHeight (c, temp - c->y, FALSE);
- c->y = temp - c->height;
- }
- else if (frame_y < 0)
- {
- temp = c->y + c->height;
- c->y = frame_top;
- clientSetHeight (c, temp - c->y, FALSE);
- c->y = temp - c->height;
- }
- }
- else if (move_bottom)
- {
- if (c->y + c->height < MAX (disp_y + min_visible, screen_info->margins [STRUTS_TOP] + min_visible))
- {
- temp = MAX (disp_y + min_visible, screen_info->margins [STRUTS_TOP] + min_visible);
- clientSetHeight (c, temp - c->y, FALSE);
- }
- }
- if (move_left)
- {
- if (c->x > MIN (disp_max_x - min_visible, screen_info->width - screen_info->margins [STRUTS_RIGHT] - min_visible))
- {
- temp = c->x + c->width;
- c->x = MIN (disp_max_x - min_visible, screen_info->width - screen_info->margins [STRUTS_RIGHT] - min_visible);
- clientSetWidth (c, temp - c->x, FALSE);
- c->x = temp - c->width;
- }
- }
- else if (move_right)
- {
- if (c->x + c->width < MAX (disp_x + min_visible, screen_info->margins [STRUTS_LEFT] + min_visible))
- {
- temp = MAX (disp_x + min_visible, screen_info->margins [STRUTS_LEFT] + min_visible);
- clientSetWidth (c, temp - c->x, FALSE);
- }
- }
+ /* Make sure the title remains visible on screen, adjust size if moved */
+ cx = c->x;
+ cy = c->y;
+ clientConstrainPos (c, FALSE);
+ c->height -= c->y - cy;
+ c->width -= c->x - cx;
if (passdata->poswin)
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list