From 92eff967a7c4d3489d97b876605f2d9f9d4e765c Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" Date: Wed, 16 Sep 2009 21:54:58 +0200 Subject: [PATCH] Maximus: Consider the full_maximize window attribute When maximumizing a window which has the full_maximize attribute set we have to consider two possibilities: 1. If the new y coordinate is zero it means that no other window blocked its maximumization up to the top of the screen, so we want to put the titlebar outside. 2. If the new y coordinate is not zero it means that another window in the current workspace blocked its way to y = 0. In this case we do nothing with the titlebar. Note that there is another possible fine tunning which is not addressed in this patch, which is to consider the resize bar. --- src/actions.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/actions.c b/src/actions.c index 9c81d3da..1a383f29 100644 --- a/src/actions.c +++ b/src/actions.c @@ -379,8 +379,13 @@ void wMaximizeWindow(WWindow * wwin, int directions) new_height -= wwin->frame->top_width + wwin->frame->bottom_width; } - if (directions & MAX_MAXIMUS) + if (directions & MAX_MAXIMUS) { find_Maximus_geometry(wwin, usableArea, &new_x, &new_y, &new_width, &new_height); + if (WFLAGP(wwin, full_maximize) && new_y == 0) { + new_y -= wwin->frame->top_width; + new_height += wwin->frame->top_width - 1; + } + } wWindowConstrainSize(wwin, &new_width, &new_height); -- 2.11.4.GIT