Invisible bar on a `top` layer would still intercept pointer events and
stop them from reaching windows below. Always changing the layer to
to `bottom` along with making bar invisible would prevent that.
Extract two surface implementations from the bar class: GLSSurfaceImpl
and RawSurfaceImpl. This change allowed to remove _all_ surface type
conditionals and significantly simplify the Bar code.
The change also applies PImpl pattern to the Bar, allowing to remove
some headers and fields from `bar.hpp`.
Previous attempts to use auto exclusive zone from gtk-layer-shell failed
because gls was expecting real booleans (`TRUE`/`FALSE`) as set_anchor
arguments. With that being fixed, gtk_layer_auto_exclusive_zone_enable
makes gls handle everything related to the bar resizing.
The only remaining purpose of onConfigureGLS is to log warnings and bar
size changes; gtk-layer-shell code path no longer needs saved width_ or
height_ values.
Other units are all uppercased, so using an uppercased "K" makes it look more consistent (especially when {bandwidthUpBits} or something like that is used).
It's not allowed to bind to a higher version of a wayland protocol than
supported by the client. Binding wlr-foreign-toplevel-manager-v1 v3 to
a generated code for v2 causes errors in libwayland due to a missing
handler for `zwlr_foreign_toplevel_handle_v1.parent` event.
- Add elapsedTime and totalTime to tooltip format arguments
- Catch format exceptions and print error
- Copy mpd connection error message before it gets freed
- Update display after connection to mpd was lost
Read `layer`, `exclusive`, `passthrough` into a special mode "default".
Drop `overlay` layer hacks, as it's easier to use `"mode": "overlay"`
for the same result.
Use `mode` (`waybar::Bar::setMode`) as a shorthand to configure bar
visibility, layer, exclusive zones and input event handling in the same
way as `swaybar` does.
See `sway-bar(5)` for a description of available modes.
Implement a wrapper over Glib::Dispatcher that passes the arguments to
the signal consumer via synchronized `std::queue`.
Arguments are always passed by value and the return type of the signal
is expected to be `void`.
- Add MPD module option `password`, and document it.
- Add logic to send the password, directly after connecting to
MPD.
Fixes: #576
Signed-off-by: Joseph Benden <joe@benden.us>