aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-02-24 21:38:35 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-02-24 21:38:35 +0000
commit7f270a9f01f8c2674a29a1fcd1b91c8ea67cf6ea (patch)
tree081744977ec0e47241e4839d192c222aa220d584 /terminal.h
parentrender: csd: render all borders and the title bar (diff)
term: add term_surface_kind(), and track currently active surface
This is needed to handle pointer motion and button events correctly, since mouse actions in e.g. CSD surfaces are very different from mouse actions in the main window.
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/terminal.h b/terminal.h
index 53fecf6b..c25c0245 100644
--- a/terminal.h
+++ b/terminal.h
@@ -185,6 +185,17 @@ struct sixel {
struct coord pos;
};
+enum term_surface {
+ TERM_SURF_NONE,
+ TERM_SURF_GRID,
+ TERM_SURF_SEARCH,
+ TERM_SURF_TITLE,
+ TERM_SURF_BORDER_LEFT,
+ TERM_SURF_BORDER_RIGHT,
+ TERM_SURF_BORDER_TOP,
+ TERM_SURF_BORDER_BOTTOM,
+};
+
struct terminal {
struct fdm *fdm;
const struct config *conf;
@@ -312,6 +323,7 @@ struct terminal {
struct wayland *wl;
struct wl_window *window;
bool visual_focus;
+ enum term_surface active_surface;
struct {
bool refresh_needed; /* Terminal needs to be re-rendered, as soon-as-possible */
@@ -477,3 +489,6 @@ bool term_spawn_new(const struct terminal *term);
void term_enable_app_sync_updates(struct terminal *term);
void term_disable_app_sync_updates(struct terminal *term);
+
+enum term_surface term_surface_kind(
+ const struct terminal *term, const struct wl_surface *surface);