Move the burdensome legacy code into local function so the normal
`gears.table.crush` module setup can be used. This fixes a couple
monior issues where `args` would be ignored.
This also makes a minor change to the logic. Changing the position
always moves to wibar to the end of the stack. Previously, there
was a minor case where it would not. There was also the case when
setting the same position twice would move the wibar, which was a bug.
This was lost in 3.5->4.0 update, but still had some references in
the code and doc. At the time, the plan was to add it back
"shortly after" based on the `awful.placement` code, but it was
never merged.
Previously, it only added 1 of the 2 sides of the relevant margins
to the struct size. For example, if the position was "top", then
only the top margin was added, not the bottom one.
Without this change, if a composed placement was used, it would leak
the "override_geometry" in the args, which would be kept cached during
the next composed node. If that node had no override of its own, it
would use the previous one by accident.
In practice, it means it was impossible to resize a `wibar` manually.
The `wibar` would always restore itself to the height (or width, for
vertical ones) it previously had.
The constructor's documentation was worded as if it was a getter, which
lead to unexpected behaviour where subsequent calls for the same client
replaced previous titlebars.
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
When stopping a keygrabber with a timeout manually or through the stop
key, the timer would continue and call the stop callback again some time
later.
The error message in `gears.timer:stop` is removed, since there actually
is no harm in just returning immediately. And the timer implementation
itself calls `:stop` in certain places without checking for `.started`,
which lead to a situation where the internal call to `stop` triggered
the error message.
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
While the documentation already specified the signal via `@emits`, it
did not make it clear that this signal is emitted on a `tag` object,
rather than the `client`.
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
The behaviour of `c:to_selected_tags()` does not match what one would
have expected from its short description.
The behaviour also doesn't really match the method's name, but since
this is already in use, I won't change functionality or names here.
Instead this extends the method's documentation to accurately reflect
its implementation and also point users to the functionality that they
were likely looking for based on the method's name.
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
At some point we added an unified `maximized` property to the
client class. Originally it was just setting both horizontal
and vertical maximization. LAter on, this was rewritten to
make the state change more atomic and reversible.
Soon after, we added `immobilized_horizontal` and
`immobilized_vertical` to make most `if` simpler.
`screen.tiled_clients` was missed in that refactoring.
Fix#3169
Signed-off-by: ArenaL5 <arenal5@gmx.com>
Extend `fkeys` to F35
Signed-off-by: ArenaL5 <arenal5@gmx.com>
Reducing `numpad` to its most aggreable subset
Signed-off-by: ArenaL5 <arenal5@gmx.com>
Add method to select a layout directly
using the Super key + the numeric keypad. This method uses the layout list from the currently selected tag in the currently focused screen. (If there is no selected tag, it does nothing.)
To allow this, the keygroups `numpad` and `fkeys` were added to `awful.key.keygroups`.
Refit to avoid error by nil and to remove imperative code, as per recommendation from @Elv13.
Signed-off-by: ArenaL5 <arenal5@gmx.com>