If the output we’re mapped on is disabled (or disconnected), the
compositor will unmap us.
Up until now, our response was to simply shutdown.
Now, we destroy the surface, remove all pending rendering buffers, and
all further calls to commit() will return immediately, without doing
anything.
If the user has configured a specific monitor to use, we wait for that
output to come back. When it does, we re-create the layer surface and
then we’re up and running again.
Bars running on the “default” monitor are handled in a similar
way. Since we don’t have an output name from the configuration, we
instead store the name of the output we were mapped on, when we’re
either unmapped from that output, or that output global is destroyed.
As soon as we see that output come back, we re-create the layer
surface.
New FreeBSD versions have memfd_create but other BSDs don't.
bar/wayland.c:774:15: error: implicit declaration of function 'memfd_create' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
pool_fd = memfd_create("yambar-wayland-shm-buffer-pool", MFD_CLOEXEC);
^
bar/wayland.c:774:62: error: use of undeclared identifier 'MFD_CLOEXEC'
pool_fd = memfd_create("yambar-wayland-shm-buffer-pool", MFD_CLOEXEC);
^
This allows you to configure the width of each side of the border
individually. border.width can still be used, and will set all four
borders to the same width.
Closes#77
This is an integer that specifies the amount of scrolling that needs
to be accumulated before a wheel-up/down event is emitted.
A higher value means you need to drag your fingers a longer distance
before the event is emitted.
The default is 30.
One can now bind the left/middle/right mouse buttons to on-click. In
fact, you can have all three buttons bound to different handlers for
the same particle. The new syntax is
on-click:
left: <command>
middle: <command>
right: <command>
Leaving one out is the same thing as not mapping it at
all. Furthermore,
on-click: <command>
is still valid, and is a shorthand for
on-click:
left: <commsnd>
This is done by update_size(). Setting it in xdg_output_handle_done()
causes update_size() to do an early exit, and thus we end up never
actually configuring the surface.
We also never instantiate a pixman image, which led to a hard crash at
startup when the user had configured a specific output to use.
This allows the backend to support multi-seat "properly", by checking
against the correct seat. Before this, when we used a single, global
xcursor value, a seat whose pointer needed to be updated would not be
updated.
Instead, roundtrip once all globals have been handled. This means all
listeners have been registered.
When we detect a specific monitor to map to, and it has a non-default
scale, update the cursor theme (since it depends on the scale).
We only care about the mouse. We now track per-seat cursor positions
and cursor themes.
Any enter/leave/motion/button event will call the bar on_mouse()
method using the coordinates from the "current" seat.
Since the bar framework doesn't deal with multi-seats at all, we
internally, in the backend, track the currently active seat. This is
the seat which we last saw any kind of events from.
This is used in e.g. set_cursor(), which is called from the bar.
wl_display_dispatch() calls poll(), which is unnecessary since we
already know the FD is readable.
Use the more lower level wl_display_read_events() +
wl_display_dispatch_pending().
These require wl_display_prepare_read() to have been called.
Instead of us selecting an output randomly (we used to select that
"last" output) when the user hasn't configured one, let the compositor
choose one for us.