Carlos

I like the concept of your patch. The 50/50 separation is OK for most
of my use cases, and while we don't have a general Maximus-like functionality I will keep using it.

I will try to code up something maximus-like sometime this weekend, I will 
probably use the left half / right half more than maximus though, but let's see.

I have already pushed it 'next' and will put it in 'master' soon, unless
someone opposes very strongly and if I happen to agree with the reason.

I have a small question though,

--- a/src/actions.c
+++ b/src/actions.c
@@ -361,7 +361,6 @@ void wMaximizeWindow(WWindow * wwin, int directions)


-       changed_h = ((wwin->flags.maximized ^ directions) & MAX_HORIZONTAL);
-       changed_v = ((wwin->flags.maximized ^ directions) & MAX_VERTICAL);
-       shrink_h = (changed_h && (directions & MAX_HORIZONTAL) == 0);
-       shrink_v = (changed_v && (directions & MAX_VERTICAL) == 0);
+       directions &= (MAX_HORIZONTAL|MAX_VERTICAL|MAX_LEFTHALF|MAX_RIGHTHALF);

Why can you get rid of those lines,

It turns out you can't. I initially thought you could and removed them, but I 
put them back in the next patch (Fixed-Windows-Losing-Size-After-Maximize).

The "Fixed-Windows-Losing-Size-After-Maximize" and "Left Half / Right Half 
Maximize" patches should be merged into one patch, but my git-fu is a bit lacking.

-       } else if (shrink_h) {
+       } else if (directions & MAX_LEFTHALF) {

and use the above check instead? It seems a modification a bit unrelated
to the purpose of your patch, doesn't it?

I don't understand very well the logic behind the shrink_{h,v} check,
so that is why I ask.

I don't understand it very well either, but it looks like the shrink* flags toggle between setting the window sizes/positions from wwin->old_geometry or from wwin->frame.
Anyway, It looks like it works as expected now.

Also, I have still not managed reproduce the "focus" bug which might have been 
introduced in my original patch. Let me know if you see it in the wild.

Regards,

Johann


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

Reply via email to