mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
Basic support for Move action
- Add Move as a default mouse binding for a Titlebar Press action
- Remove the hard-coded handling in cursor_button()
Example config snippet:
<mouse>
<context name="Titlebar">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Move"/>
</mousebind>
</context>
</mouse>
This commit is contained in:
parent
687993370f
commit
c01d1f124c
5 changed files with 20 additions and 8 deletions
|
|
@ -574,15 +574,8 @@ cursor_button(struct wl_listener *listener, void *data)
|
|||
mousebindings:
|
||||
if (event->state == WLR_BUTTON_RELEASED) {
|
||||
handle_release_mousebinding(server, event->button, view_area);
|
||||
return;
|
||||
} else if (event->state == WLR_BUTTON_PRESSED) {
|
||||
if (handle_press_mousebinding(server, event->button, view_area)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (view_area == LAB_SSD_PART_TITLEBAR) {
|
||||
interactive_begin(view, LAB_INPUT_STATE_MOVE, 0);
|
||||
handle_press_mousebinding(server, event->button, view_area);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue