awesome

Welcome to awesome bug tracking system.
Tasklist

FS#964 - Unmaximizing in git/master

Attached to Project: awesome
Opened by Ignas Anikevicius (gns_ank) - Monday, 27 February 2012, 23:10 GMT
Last edited by Uli Schlachter (psychon) - Thursday, 01 March 2012, 16:12 GMT
Task Type Bug Report
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version git/master
Due in Version 4.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This happens in the current git/master.

If the command for maximizing is as follows:

c.maximized_horizontal = not c.maximized_horizontal
c.maximized_vertical = not c.maximized_vertical

then the client after unmaximizing (pressing the binding twice) remains maximized horizontally.

Similarly, if the lines are swapped like:

c.maximized_vertical = not c.maximized_vertical
c.maximized_horizontal = not c.maximized_horizontal

then the client after unmaximizing remains maximized vertically.

This seems, that awesome remembers only the last unmaximized state (either horizontally or vertically), which could be improved, but unfortunately, I have no idea how, as it would need to tackle the C code as well. I guess, that the maximized_{vertical,horizontal} commands need to be made independent, so that independently of what is done with maximized_horizontal, c.maximized_vertical = false will return the client to last vertically unmaximized state. And vice versa.

Thanks,
Ignas
This task depends upon

Closed by  Uli Schlachter (psychon)
Thursday, 01 March 2012, 16:12 GMT
Reason for closing:  Fixed
Additional comments about closing:  commit e37efaeb8ad33693002280d6cea5c2c133639c78
Author: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Date: Thu Mar 1 03:46:48 2012 +0000

awful: ewmh.lua Fix unmaximization (#964)

This makes awful not to overwrite the saved geometry by just storing the
two geometries in separate places.
Comment by Uli Schlachter (psychon) - Wednesday, 29 February 2012, 20:16 GMT
Here is what happens:

When you do "c.maximized_vertical = true", awesome's C code emits "request::maximized_vertical" on the client object. awful.ewmh then does the actual geometry change. When a client goes fullscreen, it remembers its previous geometry (function store_geometry in the same library). When you then to "c.maximized_horizontal = true", the same happens again and it remembers the whole geometry again, overwriting the previous values.

So for a fix, maximized_vertical should only store y and width and maximized_horizontal should only mess with x and height.
Since this bug is in lua code and not in C, let's see if we can find someone else who feels like writing a patch for us. :-)
Comment by Ignas Anikevicius (gns_ank) - Thursday, 01 March 2012, 03:53 GMT
Here is my hackish attempt to solve the problem. If you think, that the x,width and y,height values should be stored in the same table entry, let me know, I will rewrite it. But otherwise, it is working fine here. :)
Comment by Ignas Anikevicius (gns_ank) - Thursday, 01 March 2012, 04:02 GMT
Disregard the previous patch, as it was a silly way to solve the problem. Everything should be fixed now.
Comment by Uli Schlachter (psychon) - Thursday, 01 March 2012, 16:11 GMT
Heh.

--- @release @AWESOME_VERSION@
+-- @release v3.4-624-ga0e21bb

Loading...