aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-03-02 19:29:28 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-03-02 19:29:28 +0000
commit9699c9b8bfcbd7f9ebef5ee4ffe370cb03b1c8a2 (patch)
tree151ae11ccffbd409d7b0bce3c161dcb9bfd0dffd /terminal.c
parentREADME: CSDs have been implemented (diff)
csd: initial implementation of minimize/maximize/close buttons
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/terminal.c b/terminal.c
index 290a1425..c57b3c1c 100644
--- a/terminal.c
+++ b/terminal.c
@@ -2149,16 +2149,22 @@ term_surface_kind(const struct terminal *term, const struct wl_surface *surface)
return TERM_SURF_GRID;
else if (surface == term->window->search_surface)
return TERM_SURF_SEARCH;
- else if (surface == term->window->csd.surface[0])
+ else if (surface == term->window->csd.surface[CSD_SURF_TITLE])
return TERM_SURF_TITLE;
- else if (surface == term->window->csd.surface[1])
+ else if (surface == term->window->csd.surface[CSD_SURF_LEFT])
return TERM_SURF_BORDER_LEFT;
- else if (surface == term->window->csd.surface[2])
+ else if (surface == term->window->csd.surface[CSD_SURF_RIGHT])
return TERM_SURF_BORDER_RIGHT;
- else if (surface == term->window->csd.surface[3])
+ else if (surface == term->window->csd.surface[CSD_SURF_TOP])
return TERM_SURF_BORDER_TOP;
- else if (surface == term->window->csd.surface[4])
+ else if (surface == term->window->csd.surface[CSD_SURF_BOTTOM])
return TERM_SURF_BORDER_BOTTOM;
+ else if (surface == term->window->csd.surface[CSD_SURF_MINIMIZE])
+ return TERM_SURF_BUTTON_MINIMIZE;
+ else if (surface == term->window->csd.surface[CSD_SURF_MAXIMIZE])
+ return TERM_SURF_BUTTON_MAXIMIZE;
+ else if (surface == term->window->csd.surface[CSD_SURF_CLOSE])
+ return TERM_SURF_BUTTON_CLOSE;
else
return TERM_SURF_NONE;
}