diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-03-03 17:19:47 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-03-03 17:20:09 +0000 |
| commit | e077290c56022255a986c0560f4d496a29bab55e (patch) | |
| tree | 282a7ef008fdeb4f2c1d6d9b42bf079a5f5945c8 /quirks.c | |
| parent | config: CSD borders are always invisible (diff) | |
quirks: add shortcut for flipping all CSD surfaces sync/desync state
Diffstat (limited to 'quirks.c')
| -rw-r--r-- | quirks.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -7,6 +7,8 @@ #define LOG_ENABLE_DBG 0 #include "log.h" +#define ALEN(v) (sizeof(v) / sizeof(v[0])) + static bool is_weston(void) { @@ -53,3 +55,23 @@ quirk_weston_subsurface_desync_off(struct wl_subsurface *sub) wl_subsurface_set_sync(sub); } + +void +quirk_weston_csd_on(struct terminal *term) +{ + if (term->window->use_csd != CSD_YES) + return; + + for (int i = 0; i < ALEN(term->window->csd.surface); i++) + quirk_weston_subsurface_desync_on(term->window->csd.sub_surface[i]); +} + +void +quirk_weston_csd_off(struct terminal *term) +{ + if (term->window->use_csd != CSD_YES) + return; + + for (int i = 0; i < ALEN(term->window->csd.surface); i++) + quirk_weston_subsurface_desync_off(term->window->csd.sub_surface[i]); +} |
