aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-11-30 16:11:00 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-11-30 16:11:00 +0000
commitfbeb1e96103681b6a3fac49443e64ed13ae28737 (patch)
tree9678d7f14ddc3bd542e7e84e1441748307bbf366 /terminal.h
parentterm: add term_mouse_grabbed() (diff)
term: mouse reporting functions no longer take modifier state
The mouse reporting functions are called from input when we receive Wayland mouse events. We used to pass the current keyboard modifier (shift, alt, ctrl, etc) to the terminal functions. This however is wrong, since we may receive Wayland mouse events without having keyboard focus. When we don't have keyboard focus, the modifier state doesn't apply to us. Remove the modifier arguments from the terminal mouse reporting functions. These functions now read this state directly instead, but only when the terminal instance in question has keyboard focus.
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/terminal.h b/terminal.h
index eefc2065..bec33790 100644
--- a/terminal.h
+++ b/terminal.h
@@ -360,12 +360,9 @@ void term_restore_cursor(struct terminal *term);
void term_focus_in(struct terminal *term);
void term_focus_out(struct terminal *term);
-void term_mouse_down(struct terminal *term, int button, int row, int col,
- bool shift, bool alt, bool ctrl);
-void term_mouse_up(struct terminal *term, int button, int row, int col,
- bool shift, bool alt, bool ctrl);
-void term_mouse_motion(struct terminal *term, int button, int row, int col,
- bool shift, bool alt, bool ctrl);
+void term_mouse_down(struct terminal *term, int button, int row, int col);
+void term_mouse_up(struct terminal *term, int button, int row, int col);
+void term_mouse_motion(struct terminal *term, int button, int row, int col);
bool term_mouse_grabbed(const struct terminal *term);
void term_xcursor_update(struct terminal *term);