diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-03-02 19:29:28 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-03-02 19:29:28 +0000 |
| commit | 9699c9b8bfcbd7f9ebef5ee4ffe370cb03b1c8a2 (patch) | |
| tree | 151ae11ccffbd409d7b0bce3c161dcb9bfd0dffd /terminal.c | |
| parent | README: CSDs have been implemented (diff) | |
csd: initial implementation of minimize/maximize/close buttons
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -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; } |
