The constraint:set_width function listed ‘height’ as a required parameter; the constraint:set_height function listed ‘width’ as a required parameter. Swapped those around.
Also, fix the fitting logic so that the result width and height are fitted in the available space. Previously the result dimensions can be larger than the input, but cropped in e7a21947e6/lib/wibox/widget/base.lua (L547). But still it can cause problems e.g. when used inside wibox.container.place.
It looked horrible/buggy when combined. Now it looks like people would
expect it to work. Another problem was the `bar_border_width` look
when `ticks` was `true.
luajit was failing to GC the notification about 5% of the time. This
commit stores all widget notifications in a weak table and don't let
any lambda access the parent object notification object.
Each of those changes reduces the failure rate. There might still be
a couple in there, but the test passed 200x on my laptop with 100%
success rate.
The old behavior would move the client when `nil` was passed by
an almost arbitrary value. It would most of the time go off screen.
While this is a behavior change, what it replaces was so broken I
doubt anybody actually used `nil` in `relative_move`.
When the theme variables were moved to the backend instead of `rc.lua`,
some magic was added to disable them if the user set the border. However,
some undocumented `awful.placement` code also set them and turned off
the theme variables. So it worked *once* then stopped working.
If client client was tiled, the `fallback` could be
`theme.border_color_normal`, but if the client was
tiled, this fallback was never tried.
Now it tests for both "floating" and "active" fallbacks.
This problem actually affects the default theme.
Right now, all rules are additive, they are squashed into one big
array of properties. This is normally fine, but sometime you want
explicit rules for some objects, but also default rules if nothing
matches.
While this can be expressed in the current system by overriding
*all* properties, this require more effort than having "special"
and "fallback" rules.
It might be a good idea to deprecate them and move them to the tag
class. However, these APIs are not exactly well designed, so
moving them wont solve that. Some day the dynamic client layout will
hopefully be merged and send these functions to the heap of smelly
bad ideas trash.
The last time this page had a refresh was in parallel with another
massive whole-doc project. Thus, this page still had older
conventions which everything else had already removed.
It also no longer use the master/slave name. In this case, it kinds
of make sense since, for example, of the tag `master_count` is greater
than the number of clients, calling `client.setslave` move the client
to another "master" slot.
Closes#626
By fixing some suspend bugs a few weeks ago, I "regressed" this
a little. By that, I mean there were bugs in the suspend code
which caused `ignore_suspend` to work simply because suspend
globally failed rather than `ignore_suspend` being implemented
correctly.
Fix#3465
There is more into that table than just screens. If `get_by_id` was
called with an invalid notification (or a "future" one in case of
suspended / do_not_disturb), it would explode.
thread at PR 3448. PR 3448 involves changes to expand the content
(screenshot) API. Originally, I added both root.content() and and
screen.content to the C source, as client.content has always been
handled. However, screen.content in effect takes a root screenshot and
returns a crop of it. This can just as easily be done through Lua.
When this quick update was implemented in github, the code added to
awful.screen.lua was not quite correct. These changes represent the
debugged version. Users can now call s.content for a screen object, s,
and the screenshot will work transparently.
Signed Off: Brian Sobulefsky <brian.sobulefsky@protonmail.com>
This exposes the `librsvg` DPI and Stylesheet properties. This
is a groundwork commit to port the xresources theme to use a SVG
wallpaper instead of hardcoded Cairo code to generate the colorfar
logo.
It makes the shims impossible to implement without a double free,
a memory leak or a crash. Using `capi` should not require to
destroy the LGI wrappers.
Another example, not fixed in this commit, are the client shapes.
`gears.wallpaper` is a flat API (that doesn't even belong in gears) and
is neither well integrated with the other AwesomeWM concepts, nor well
documented or easy to understand for newcomers.
This module adds an object oriented, declarative, module with properties
for the most common wallpaper types. It also integrates with
`awful.placement` and the `wibox` module.
The design attempts to make the wallpaper a "wibox like" object like
the titlebars. It is non-interactive, but still allows the widgets. Note
that this is slow and should be avoided for dynamic content. It is why
the widgets are never updated unless manually reloaded. The objects also
attempt to be disposable rather than persistent. Thus they are immutable
by default to prevent accidental abuse.
Fix#3428#2596
Previously, it was really hard to get the image to do one *or* the
other. The `resize` property set both at the same time.
While it could, this does not deprecate the old `resize` property
since 99% of the user wan't to lock both.
Previously, only a filename was returned. Getting the path was
inconvinient when used within a declarative construct.
It was also misbehaving then the directory didn't exist. Finally,
the extention list now accept extension names starting with a dot.
If a config with naughty.layouts.box crashes at startup and the
fallback config uses naughty.layouts.legaxy, it is possible their
will be some lookup for an object which isn't tracked by the legacy
module.
Two calls to gdebug.print_warning() in run_with_keybindings use an
argument that concatenates a fixed string with the result returned by a
call to gdebug.dump(). gdebug.dump() is the debug library function for
immediate printing. It has no return value. This causes the correct
message in print_warning to not be printed, and also causes a
naughty.notify box to appear warning of an attempt to concatenate to an
empty variable.
The call to gdebug.print_warning should have an argument made by
concatenating to gdebug.dump_return(). Incidentally, this is in fact the
function used internally by gdebug.print().
Signed off by: Brian Sobulefsky <brian.sobulefsky@protonmail.com>
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.
If the problem happens early enough, it was possible that the
screen arrway wasn't initialized yet. In that case, the notification
would fail to render.
The list of possible values was missing one. Additionally, this adds an
example to visualize the available options.
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
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>
Replace the `awful.keygroup` property by an table that can be used
as an enum to point to the `awful.keygroups` definitions.
The previous field for `awful.keygroup` was empty (even no-existant),
and was here only to appear in the documentation as a definition for
the valid values to target keygroups.
With this new enum style table, the user can easily refere to keygroups
the same way we did for mouse buttons.
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>
The newly changed code doesn't handle this well:
local w = wibox.widget {
{
--add anything here
widget = wibox.layout.fixed.horizontal
},
widget = wibox.layout.fixed.horizontal,
}
This will cause the "inner" fixed layout to have the minimum size
it supports. In that case, if the last widget has "no size" because
it supports up to 0x0, then it isn't added to the layout.
This was done "on purpose" because if there is a spacing, then `:fit`
would have returned a size "too small" because the last spacing area
would be (correctly) missing.
But if the zero sized widget isn't added to the layout, then it's size
isn't tracker. So if it emits a layout_changed signal, nothing catches
it.
The "fix" is rather hacky and probably a little incorrect. It rely
on the behavior of `:fit()` to avoid adding the "wrong" widgets to
the layout, which is fragile.
However, I don't have a better idea.
feat(menubar): allow setting beautiful.menubar_font
fix(menubar: init: get_current_page): label return value
Update lib/wibox/widget/textbox.lua
Co-authored-by: Lucas Schwiderski <4508454+sclu1034@users.noreply.github.com>
Update lib/wibox/widget/textbox.lua
Co-authored-by: Lucas Schwiderski <4508454+sclu1034@users.noreply.github.com>
revert textbox changes
fix(menubar: init: show): fix font height detection
Update lib/menubar/init.lua
fix(menubar: init: get_current_page): list_spacing depends on presence of icon; also take cursor block width into consideration
fix(menubar: init: label): force icons to be square
fix(menubar: init: get_current_page): also take border_width into consideration when computing available space
merge conflict
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>