Xfce Wiki

Sub domains
 
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon P <iskra42463@bigmir.net>2015-01-03 11:48:09 +0100
committerOlivier Fourdan <ofourdan@redhat.com>2015-01-05 22:11:43 +0100
commitb97b14868e27e48d4d475ac0497726f16de9a4e1 (patch)
treebc53c0c1dca819cef1827f67fbedf952c394b58c
parent03782834a499b4b8b3de11fe2e19f386558d90e3 (diff)
downloadxfwm4-b97b14868e27e48d4d475ac0497726f16de9a4e1.tar.gz
Fix resize with partial struts
Bug #10951 Make sure the window title remains visible using partial struts.
-rw-r--r--src/moveresize.c51
1 files 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)
{