1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 21:08:08 +01:00

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.
This commit is contained in:
Carlos R. Mafra
2009-09-16 21:54:58 +02:00
parent eaca92db50
commit 92eff967a7

View File

@@ -379,8 +379,13 @@ void wMaximizeWindow(WWindow * wwin, int directions)
new_height -= wwin->frame->top_width + wwin->frame->bottom_width; 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); 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); wWindowConstrainSize(wwin, &new_width, &new_height);