diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-03-06 18:21:57 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-03-06 18:21:57 +0000 |
| commit | e4436e84dfa68119496032621e284588c621fa99 (patch) | |
| tree | eaf7569ef09ec6fb369aa599ea4d13acadd87833 /terminal.h | |
| parent | sixel: CSI setters also write a reply to the client (diff) | |
| parent | wayland: remove debug logs (diff) | |
Merge branch 'csd'
This implements client side decorations and have been tested on GNOME
and Weston.
They also render correctly in KWin, but cannot be used to move or
resize the window. I believe this is a bug in KWin's handling of
sub-surfaces positioned outside the parent surface. Luckily, KWin uses
server side decorations.
This merge also contains a lot of bug fixes related to resizing and
rendering of sub-surfaces in general (i.e. the scrollback search box).
Diffstat (limited to 'terminal.h')
| -rw-r--r-- | terminal.h | 36 |
1 files changed, 34 insertions, 2 deletions
@@ -185,6 +185,20 @@ 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, + TERM_SURF_BUTTON_MINIMIZE, + TERM_SURF_BUTTON_MAXIMIZE, + TERM_SURF_BUTTON_CLOSE, +}; + struct terminal { struct fdm *fdm; const struct config *conf; @@ -237,6 +251,8 @@ struct terminal { int scale; int width; /* pixels */ int height; /* pixels */ + int unmaximized_width; /* last unmaximized size, pixels */ + int unmaximized_height; /* last unmaximized size, pixels */ struct { int left; int right; @@ -312,9 +328,23 @@ 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 */ + /* Scheduled for rendering, as soon-as-possible */ + struct { + bool grid; + bool csd; + bool search; + } refresh; + + /* Scheduled for rendering, in the next frame callback */ + struct { + bool grid; + bool csd; + bool search; + } pending; + int scrollback_lines; /* Number of scrollback lines, from conf (TODO: move out from render struct?) */ struct { @@ -341,7 +371,6 @@ struct terminal { struct cell *cell; /* For easy access to content */ } last_cursor; - bool pending; /* Need to re-render again, after next frame-callback */ struct buffer *last_buf; /* Buffer we rendered to last time */ bool was_flashing; /* Flash was active last time we rendered */ bool was_searching; @@ -477,3 +506,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); |
