mirror of
https://github.com/labwc/labwc.git
synced 2026-02-23 01:40:18 -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
|
|
@ -65,8 +65,7 @@ struct seat {
|
|||
struct input_method_relay *input_method_relay;
|
||||
|
||||
/**
|
||||
* This is usually zeroed and is only set on button press while the
|
||||
* mouse is over a view or surface, and zeroed on button release.
|
||||
* Cursor context saved when a mouse button is pressed on a view/surface.
|
||||
* It is used to send cursor motion events to a surface even though
|
||||
* the cursor has left the surface in the meantime.
|
||||
*
|
||||
|
|
@ -76,10 +75,8 @@ struct seat {
|
|||
* It is also used to:
|
||||
* - determine the target view for action in "Drag" mousebind
|
||||
* - validate view move/resize requests from CSD clients
|
||||
*
|
||||
* Both (view && !surface) and (surface && !view) are possible.
|
||||
*/
|
||||
struct cursor_context pressed;
|
||||
struct cursor_context_saved pressed;
|
||||
|
||||
struct lab_set bound_buttons;
|
||||
|
||||
|
|
@ -139,7 +136,6 @@ struct seat {
|
|||
struct wl_list tablet_pads;
|
||||
|
||||
struct wl_listener constraint_commit;
|
||||
struct wl_listener pressed_surface_destroy;
|
||||
|
||||
struct wlr_virtual_pointer_manager_v1 *virtual_pointer;
|
||||
struct wl_listener new_virtual_pointer;
|
||||
|
|
@ -392,8 +388,6 @@ void seat_pointer_end_grab(struct seat *seat, struct wlr_surface *surface);
|
|||
void seat_focus_lock_surface(struct seat *seat, struct wlr_surface *surface);
|
||||
|
||||
void seat_set_focus_layer(struct seat *seat, struct wlr_layer_surface_v1 *layer);
|
||||
void seat_set_pressed(struct seat *seat, struct cursor_context *ctx);
|
||||
void seat_reset_pressed(struct seat *seat);
|
||||
void seat_output_layout_changed(struct seat *seat);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue