Technically this doesn't solve any memory leak, but AwesomeWM uses in
average less memory when changing the selected tab in quick succession.
This is because it has less "temporary" tables to track.
The way background are rendered changed to accomodate issues regarding
cliping and border. However this broke the documentation examples.
This commit fixes this in the least hacky way I found.
Fixes#2727
Nobody wants to set this parameter. It is necessary because the old
API allowed `awful.rules` to be used with random for random matching.
This stopped "really" working between the 3.4 and 3.5 release because
the code started to accumulate "corner case" fixes aligned with the
client properties. v4.0 added more ordering and v4.3 added external
sources. After this, it is unusable with external objects, but
`gears.matcher` handle this use case very well.
In a perfect world we would have pure expression matching, but
that's problematic with all the "metaness" of the code. For now,
this adds an imperfect way to match the minimum and maximum of
number properties.
It will be used by the screen rules for the DPI and size properties.
This is hardcoded in `awful.rules`, but cannot be shared due to the
priority corner cases. Given in the long run any "standard" priority
should use the topological sort API, better not try to share *that*
code.
It is now possible to add and remove rules. This is superior to how
`awful.rules` originally handled rules because modules can now
assume adding and removing rules works.
The reason for the methods rather than `table.insert` is partially
because future commits will add signals. In turn, this will allow
`gears.matcher` to be extended by module using it using the extra
"introspection" made possible by the signals.
The name is self explanatory, it adds more actions to a notification.
One of the use case is adding a snooze/reming_me action. Another one
is "mute similar notifications".
The reason is that if actions are provided by rules, only one instance
exist. It was a mistake to couple actions with their notifications. It
could not work reliably and has to be removed.
The commit also change the notification action storage to be a copy
instead of the original table. This allows to append actions (not part
of this commit) without risking adding them to the wrong notification.
**WARNING** This break an unreleased API by removing the `notification`
property of an action.
* app_name: To be used in filters when no clients are found.
* max_width: Allow to set it from the rules, it might be different
when a `widget_template` is used.
* widget_template: Now it can be set from the rules without further
boilerplate code.
The old preset code had a primitive implementation of the rule API
used in `naughty.dbus`. Now that `gears.matcher` is extracted from
`awful.rules`, it is possible to share the code.
The first step is to only enable the old API when the new
`request::preset` isn't connected. This is the same way the legacy
popup is only enabled when nothing is connected to `request::display`.
This removes the imperative "mutex" logic from rc.lua, where it doesn't
belong. It also makes it closer to the "vision" of making `rc.lua` fully
modular.
* action icons
* persistence
* residence
* categories
* animated icons
* more ways to get icons
In addition, the commit also tries its best to attach notifications to
objects using various dubious semi compliant hints or the DBus PID. It
works often enough to be useful.
Since commit 3295e9f33d, the imagebox tries to use libRSVG via
lgi.Rsvg to load SVG files without rasterising them immediately.
Instead, they are directly drawn at the expected size.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Add a test which recreates the titlebar for an existing client and
checks that widgets from the old titlebar instance can be GC'd.
Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
Some titlebar widgets (`awful.titlebar.widget.titlewidget`,
`awful.titlebar.widget.button` and other specific button widgets) could
not be garbage collected until the associated client was unmanaged,
because the signal connection used to update the widget was never
destroyed, and the signal handling function was keeping a reference to
the widget in its environment. This resulted in high memory usage when
the titlebar widgets were recreated multiple times for the same client
(this does not happen with the default Awesome configuration, but may be
needed for dynamic titlebar reconfiguration in a custom config).
Modify the code to use weak tables instead of direct signal connections
to avoid keeping strong references to widgets. The widget update
functions still keep strong references to the widget itself (creating a
reference loop, but the Lua GC should handle it correctly) and the
client object, but this should not be a problem.
One publicly visible change is that `awful.titlebar.widget.titlewidget`
now has an `update` function, like the button widgets.
Signed-off-by: Sergey Vlasov <sigprof@gmail.com>