mirror of
https://github.com/labwc/labwc.git
synced 2026-02-24 01:40:15 -05:00
cursor: generalize seat->pressed
This commit moduralize seat_{set,reset}_pressed() into
cursor_context_save() so that we can also have seat->hovered later.
This commit is contained in:
parent
4fcb873f6f
commit
acb3da7903
8 changed files with 97 additions and 68 deletions
|
|
@ -400,7 +400,7 @@ handle_request_move(struct wl_listener *listener, void *data)
|
|||
* want.
|
||||
*/
|
||||
struct view *view = wl_container_of(listener, view, request_move);
|
||||
if (view == view->server->seat.pressed.view) {
|
||||
if (view == view->server->seat.pressed.ctx.view) {
|
||||
interactive_begin(view, LAB_INPUT_STATE_MOVE, LAB_EDGE_NONE);
|
||||
}
|
||||
}
|
||||
|
|
@ -418,7 +418,7 @@ handle_request_resize(struct wl_listener *listener, void *data)
|
|||
*/
|
||||
struct wlr_xdg_toplevel_resize_event *event = data;
|
||||
struct view *view = wl_container_of(listener, view, request_resize);
|
||||
if (view == view->server->seat.pressed.view) {
|
||||
if (view == view->server->seat.pressed.ctx.view) {
|
||||
interactive_begin(view, LAB_INPUT_STATE_RESIZE, event->edges);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue