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.
We are probably playing a game and we don't want to be resizing the window when trying to duck/jump whatever.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Less janky than just returning if one extent reaches max, and also uses the new min_size function for xwayland hint support.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Split desktop_focus_view() into the following two functions:
- desktop_focus_and_activate_view()
- desktop_raise_view()
Always call view_set_activated() rather than using the private
set_activated(). This keeps the code cleaner and ensures
wlr_foreign_toplevel_handle_v1_set_activated() is called.
Can successfully parse the following XML and and implement the action:
<mouse>
<context name="TitleBar">
<mousebind button="Left" action="DoubleClick">
<action name="ToggleMaximize"/>
</mousebind>
</context>
</mouse>
The XML parsing code for this looks A LOT different than the already
existing XML parsing code. It may have to be reworked
...which is used by desktop_view_at() and ssd_at() to determine which
decoration part is under the cursor.
ssd_interactive_box() allows deocoration parts to extend outside the
visible regions, and therefore supports a wider 'resize-edges' area than
the border itself.