Age | Commit message (Collapse) | Author |
|
This removes any pending messages once the item is destroyed.
Furthermore, this installs SNI event calbacks asynchronously
in order to prevent sd-bus from bypassing pending messages.
|
|
This includes some refactoring and fixing a small memory leak.
|
|
|
|
|
|
|
|
|
|
24e8ba048aef4751c6fa1d5982ee634f921e6cf6 did not take scaling into account.
The hotspot size used pixel coordinates, the absolute coordinates were logical,
and the relative coordinates were completely wrong.
This commit makes all coordinates use logical values. If
`"float_event_coords":true` is sent in the handshake message, coordinates are
sent as floating-point values.
The "scale" field is an integer containing the scale value.
|
|
This increases the precision of the clicks when using i3bar.
|
|
The function group_handler may get a nullptr as `new_group`. If that's
the case, return true, as if `new_group` was the empty string.
Also make the conversion to bool explicit when calling `strcmp`.
|
|
Before swaybar would exit with a protocol error when a pointer or touch
device was removed.
|
|
|
|
This is the first in a series of commits to refactor the color handling
in sway. This changes parse_color to return whether it was success and
no longer uses 0xFFFFFFFF as the fallback color. This also verifies that
the string actually contains a valid hexadecimal number along with
the length checks.
In the process of altering the calls to parse_color, I also took the
opportunity to heavily refactor swaybar's ipc_parse_colors function.
This allowed for several lines of duplicated code to be removed.
|
|
|
|
Fixes #4665.
|
|
In case a tray icon cannot be found or does not have a desirable size,
swaybar retries the search again and again, which increases load on disk
and CPU. This commit solves it by storing target_size for each icon, so
that swaybar does not search for an icon of some size if it already tried to.
Fixes #3789.
|
|
Other components like workspace button, status line (error or plain
text) already render text at integer coords. This make status block
also render text at integer coords.
|
|
This adds complete support for the barconfig_update ipc event. This also
changes the bar command and subcommand handlers to correctly emit the
event. This makes it so all bar subcommands other than id and
swaybar_command are dynamically changeable at runtime. sway-bar.5 has
been updated accordingly
|
|
find_icon() will search in theme appropriate subdirs.
|
|
|
|
|
|
This corrects the description of border_{top,bottom,left,right} in the
block properties table in swaybar-protocol.7. The values should be an
integer denoting the width/height rather than a boolean denoting
whether to show them.
|
|
Note: since strtoul() has no real error return code (both 0 and
ULONG_MAX may be returned on both success and failure), set errno=0
before calling strtoul().
|
|
If the XCURSOR_THEME and/or XCURSOR_SIZE environment variables are
set, use the theme and size they define.
If they're not set, use the same defaults as before (system default
theme, size=24).
|
|
This adds swaybar-protocol.7.scd documenting the swaybar status line
protocol including some differences from the i3bar counterpart.
|
|
This just adds multiseat support to swaybar
|
|
This allows swaybar to become visible when the mode changes (to any
mode other than the default). swaybar will be hidden again when the
modifier is pressed and released or when switching back to the default
mode.
This also applies the same logic to visible by urgency to hide swaybar
when the modifier is pressed and released.
These changes are to match i3's behavior.
|
|
The read_theme_file function used to return an invalid icon_struct in
some cases, for example when an empty index.theme file was read.
This makes sure the struct we're returning is always valid as per the
Icon Theme specification.
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
|
|
Add a 3xscale margin matching other spacing in swaybar as part of short
text width calculations
|
|
- Predicted status line can be negative, so corresponding variables should
not be unsigned. Changed to double as position is actually calculated as
double.
|
|
Matches i3bar behavior of setting all blocks to use the short_text if the full
text width does not fit.
|
|
|
|
If the icon index.theme contained a key-value pair without a preceding
group header, entry_handler() would be called with a zero pointer and
lead to a segfault.
Set the error flag and break on such malformed files.
|
|
`len` will underflow but will overflow right after, so it's not as bad as it
may appear. Still better not to under/overflow at all.
Fixes https://github.com/swaywm/sway/issues/3862
|
|
The only use of `join_list` in swaybar/tray/icon.c has been rewritten.
|
|
by converting from network byte order to host byte order
|
|
Overlay mode puts the bar above normal windows and passes through/ignores any
touch/mouse/keyboard events that would be sent to it.
|
|
|
|
|
|
|
|
Before, only the first matching item would be removed, which could leave
stale items.
|
|
Counter-intuitively, `sd_bus_slot_set_floating` expects 0 to set it to
floating.
|
|
This prevents a heap-use-after-free crash when sway terminates.
|
|
Revert double frees.
|
|
|
|
This reverts commit eda1bf769f239a9e8d5a9907255a330e3113a649.
|
|
This reverts commit b5d95f264d5b08f6228e05be680ee36fc06ca6d6.
|
|
|
|
json-c.pc contains `Cflags: -I${includedir}/json-c`, so `<json-c/json.h>`
won't be found unless the parent directory is searched by default.
|
|
swaybar: fix crash with some tray icon pixmaps
|
|
Apparently, IconThemePath needs to be reread on NewIcon signal.
This fixes tray icon updates in electron apps with libappindicator-gtk3.
|