From 4e48d550efba98ebecf4b60045004e52c585c52d Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 9 Jul 2020 09:52:11 +0200 Subject: multi-seat: improve handling of multiple (mouse) pointers * xcursor always set for all pointers * xcursor sometimes not updated when it should be * mouse grabbed state wasn't per seat, but global (i.e. "does at least one seat enable mouse grabbing") * selection enabled state wasn't per seat --- terminal.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index 604511da..8316795f 100644 --- a/terminal.h +++ b/terminal.h @@ -305,7 +305,6 @@ struct terminal { uint32_t text; uint32_t cursor; } cursor_color; - const char *xcursor; struct { enum selection_kind kind; @@ -439,6 +438,18 @@ struct terminal { char *cwd; }; +extern const char *const XCURSOR_LEFT_PTR; +extern const char *const XCURSOR_TEXT; +//extern const char *const XCURSOR_HAND2; +extern const char *const XCURSOR_TOP_LEFT_CORNER; +extern const char *const XCURSOR_TOP_RIGHT_CORNER; +extern const char *const XCURSOR_BOTTOM_LEFT_CORNER; +extern const char *const XCURSOR_BOTTOM_RIGHT_CORNER; +extern const char *const XCURSOR_LEFT_SIDE; +extern const char *const XCURSOR_RIGHT_SIDE; +extern const char *const XCURSOR_TOP_SIDE; +extern const char *const XCURSOR_BOTTOM_SIDE; + struct config; struct terminal *term_init( const struct config *conf, struct fdm *fdm, struct reaper *reaper, @@ -518,7 +529,7 @@ void term_mouse_up( void term_mouse_motion( struct terminal *term, int button, int row, int col, bool shift, bool alt, bool ctrl); -bool term_mouse_grabbed(const struct terminal *term); +bool term_mouse_grabbed(const struct terminal *term, struct seat *seat); void term_xcursor_update(struct terminal *term); void term_set_window_title(struct terminal *term, const char *title); -- cgit v1.3