awesomeWM / awesome

awesome window manager
https://awesomewm.org/
GNU General Public License v2.0
6.36k stars 597 forks source link

tile_group function in tile.lua doesn't respect size_hints_honor = false #1755

Open sw9 opened 7 years ago

sw9 commented 7 years ago

Output of awesome --version: awesome v4.1 (Technologic) • Compiled against Lua 5.1.5 (running with Lua 5.1) • D-Bus support: ✔ • execinfo support: ✔ • xcb-randr version: 1.4 • LGI version: 0.9.1

How to reproduce the issue:

  1. Add { rule = { }, properties = {size_hints_honor = false} to awful.rules.rules.
  2. Change layout to tile.
  3. Set master to some window that sets a minimum width, such as Chrome, or Gedit, or Nautilus.
  4. Decrease the master width factor.

Actual result: Decreasing the master width factor has no effect after a certain point because tile_group sets width to size = math.max(size_hint, size) without checking size_hints_honor. Also, if you want to increase the master width factor, you have to call awful.tag.incmwfact( 0.05) repeatedly before the width actually changes, since mwfact was decreased even while the actual width of the master window didn't change.

Expected result: min_width should be ignored if size_hints_honor is false. Also, if mwfact should not decrease any further if the master window width fails to decrease.

jbrockc commented 4 years ago

@sw9 I could only get awful.tag.incmwfact to work on certain layouts (awful.layout.layouts). For example, it works with awful.layout.suit.tile, and awful.layout.suit.tile.left,, but it does not work on awful.layout.suit.fair,. I suppose that would make it unfair. ;)

actionless commented 4 years ago

i would start with trying in the latest AwesomeWM git revision as a lot of things changed from 4.1

Aire-One commented 4 years ago

@sw9 I could only get awful.tag.incmwfact to work on certain layouts (awful.layout.layouts). For example, it works with awful.layout.suit.tile, and awful.layout.suit.tile.left,, but it does not work on awful.layout.suit.fair,. I suppose that would make it unfair. ;)

You're right. That's about how clients layouts are supposed to work.

The documentation doesn't make it obvious but layouts don't have to implement all features / respect all "rules" (generally speaking "rules" like client size, placement and so on, not awful.rules).