mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-14 05:33:59 -04:00
csd: position CSD sub-surfaces *outside* the main window
For now, this behavior is controlled with an ifdef. At least kwin seems very buggy when the decorations are positioned like this (but normally you'd use server-side decorations with kwin anyway). This commit also changes 'use_csd' to be a tri-state variable; when instantiating a window it is set to 'unknown'. If there's no decoration manager available (e.g. weston), we immediately set it to 'yes' (use CSDs). Otherwise, we wait for the decoration manager callback to indicate whether we should use CSDs or not.
This commit is contained in:
parent
45ba9f9c8f
commit
2f587f6f3d
4 changed files with 91 additions and 57 deletions
26
terminal.c
26
terminal.c
|
|
@ -1633,14 +1633,18 @@ term_visual_focus_in(struct terminal *term)
|
|||
if (term->cursor_blink.active)
|
||||
cursor_blink_start_timer(term);
|
||||
|
||||
#if 1
|
||||
for (int i = 0; i < 5; i++)
|
||||
wl_subsurface_set_desync(term->window->csd.sub_surface[i]);
|
||||
#if 1 /* Weston seems to be buggy with synchronized CSDs */
|
||||
if (term->window->use_csd == CSD_YES) {
|
||||
for (int i = 0; i < 5; i++)
|
||||
wl_subsurface_set_desync(term->window->csd.sub_surface[i]);
|
||||
}
|
||||
#endif
|
||||
render_csd(term);
|
||||
#if 1
|
||||
for (int i = 0; i < 5; i++)
|
||||
wl_subsurface_set_sync(term->window->csd.sub_surface[i]);
|
||||
if (term->window->use_csd == CSD_YES) {
|
||||
for (int i = 0; i < 5; i++)
|
||||
wl_subsurface_set_sync(term->window->csd.sub_surface[i]);
|
||||
}
|
||||
#endif
|
||||
cursor_refresh(term);
|
||||
}
|
||||
|
|
@ -1656,13 +1660,17 @@ term_visual_focus_out(struct terminal *term)
|
|||
cursor_blink_stop_timer(term);
|
||||
|
||||
#if 1
|
||||
for (int i = 0; i < 5; i++)
|
||||
wl_subsurface_set_desync(term->window->csd.sub_surface[i]);
|
||||
if (term->window->use_csd == CSD_YES) {
|
||||
for (int i = 0; i < 5; i++)
|
||||
wl_subsurface_set_desync(term->window->csd.sub_surface[i]);
|
||||
}
|
||||
#endif
|
||||
render_csd(term);
|
||||
#if 1
|
||||
for (int i = 0; i < 5; i++)
|
||||
wl_subsurface_set_sync(term->window->csd.sub_surface[i]);
|
||||
if (term->window->use_csd == CSD_YES) {
|
||||
for (int i = 0; i < 5; i++)
|
||||
wl_subsurface_set_sync(term->window->csd.sub_surface[i]);
|
||||
}
|
||||
#endif
|
||||
cursor_refresh(term);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue