On Wed 16.Sep'09 at  9:31:46 +0800, Paul Harris wrote:
> I turned on "Full screen maximization" in the Window Attributes of my GVim
> window (on a per window basis).
> When I maximise or vertical-maximise my gvim window, it will resize
> vertically until it HIDES the wmaker title bar.  This is as expected.
> When i Maximus my gvim window, it will vertically resize so that it covers
> the icons, but does NOT go bigger until the title bar is hidden.

I fixed this one here now, so forget about the previous patch (which 
was mixing a cleanup with a bug fix btw).

--8<--
>From 797ec057be309992511d8bfab1acaa94aac5dca7 Mon Sep 17 00:00:00 2001
From: Carlos R. Mafra <[email protected]>
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 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/actions.c b/src/actions.c
index 9c81d3d..1a383f2 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);
 
-- 
1.6.5.rc1


-- 
To unsubscribe, send mail to [email protected].

Reply via email to