If we don't switch focus, we want the close button to close the window associated with it, not the current focus window.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
this was broken when we moved to swallowing mouse events that triggered "Frame"-context mouse bindings. layer surfaces don't run mouse binding logic, so they need mouse events unconditionally forwarded.
in order to allow the Move action to be bound to "press" on mouse binding contexts that also have "click" bindings, we should not short-circuit event processing when the input_mode is not passthrough (the "normal" mode). doing so seems to have been intended to prevent mouse bindings from being triggered during move/resize/menu interactions, but this does not seem to occur in practice. instead, `cursor_button`'s early return in this case caused the "release" side of "click" bindings to be ignored if their "press" side began an action that changes input_mode (e.g. Move).
the cleaner way to fix this interaction would be to use "drag" rather than "press" for Move bindings, but implementing "drag" is more complexity than I want to include in this changeset.
this change is its own commit to make it easy to bisect for, in case it causes regressions.
Use environment variables XCURSOR_THEME and XCURSOR_SIZE to set cursor
theme and size respectively. Default size is 24.
Find icons themes with the command below or similar:
find /usr/share/icons/ -type d -name "cursors"
cursor_rebase() sets the cursor icon and sends a motion-event to the
surface below the cursor. It is made public in anticipation of using it
in various view_* functions.
When an output is added or removed, the position of the other
outputs can also change, resulting in windows moving between them.
We need to redraw all the outputs (not just the new one) to prevent
stale/corrupted screen contents.
When a window title changed dynamically (for example when running
"cd" within an xfce4-terminal), the titlebar did not immediately
update to show the new title. (The titlebar would update as soon
as the mouse cursor moved.)
...and replace with a local MAX macro, because:
- They contain a ({}) construct which is a GNU extension and that's
against Drew's coding style
- min() is not used anyway
- MAX() clashes with cairo's macro, so best to not add this in labwc.h
ld: error: undefined symbol: wlr_backend_get_renderer
>>> referenced by output.c
>>> labwc.p/src_output.c.o:(render_rect)
>>> referenced by output.c
>>> labwc.p/src_output.c.o:(render_rect)
>>> referenced by output.c
>>> labwc.p/src_output.c.o:(render_texture)
>>> referenced 5 more times
Based on 5865af75cf
Based on a6538ced35