mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-24 09:05:48 -04:00
term: visual_focus_{in,out}: use quirk_weston_subsurface_desync_{on,off}
This commit is contained in:
parent
7b3fffc6ec
commit
70cdb7af08
1 changed files with 29 additions and 28 deletions
57
terminal.c
57
terminal.c
|
|
@ -21,6 +21,7 @@
|
||||||
#include "async.h"
|
#include "async.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "grid.h"
|
#include "grid.h"
|
||||||
|
#include "quirks.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
#include "selection.h"
|
#include "selection.h"
|
||||||
#include "sixel.h"
|
#include "sixel.h"
|
||||||
|
|
@ -1625,6 +1626,26 @@ term_restore_cursor(struct terminal *term)
|
||||||
term->cursor.lcf = term->saved_cursor.lcf;
|
term->cursor.lcf = term->saved_cursor.lcf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static 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]);
|
||||||
|
}
|
||||||
|
|
||||||
|
static 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]);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
term_visual_focus_in(struct terminal *term)
|
term_visual_focus_in(struct terminal *term)
|
||||||
{
|
{
|
||||||
|
|
@ -1635,20 +1656,10 @@ term_visual_focus_in(struct terminal *term)
|
||||||
if (term->cursor_blink.active)
|
if (term->cursor_blink.active)
|
||||||
cursor_blink_start_timer(term);
|
cursor_blink_start_timer(term);
|
||||||
|
|
||||||
#if 1 /* Weston seems to be buggy with synchronized CSDs */
|
quirk_weston_csd_on(term);
|
||||||
if (term->window->use_csd == CSD_YES) {
|
render_csd(term);
|
||||||
for (int i = 0; i < ALEN(term->window->csd.surface); i++)
|
quirk_weston_csd_off(term);
|
||||||
wl_subsurface_set_desync(term->window->csd.sub_surface[i]);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
//render_csd(term);
|
|
||||||
render_csd_title(term);
|
|
||||||
#if 1
|
|
||||||
if (term->window->use_csd == CSD_YES) {
|
|
||||||
for (int i = 0; i < ALEN(term->window->csd.surface); i++)
|
|
||||||
wl_subsurface_set_sync(term->window->csd.sub_surface[i]);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
cursor_refresh(term);
|
cursor_refresh(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1662,20 +1673,10 @@ term_visual_focus_out(struct terminal *term)
|
||||||
if (term->cursor_blink.active)
|
if (term->cursor_blink.active)
|
||||||
cursor_blink_stop_timer(term);
|
cursor_blink_stop_timer(term);
|
||||||
|
|
||||||
#if 1
|
quirk_weston_csd_on(term);
|
||||||
if (term->window->use_csd == CSD_YES) {
|
render_csd(term);
|
||||||
for (int i = 0; i < ALEN(term->window->csd.surface); i++)
|
quirk_weston_csd_off(term);
|
||||||
wl_subsurface_set_desync(term->window->csd.sub_surface[i]);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
//render_csd(term);
|
|
||||||
render_csd_title(term);
|
|
||||||
#if 1
|
|
||||||
if (term->window->use_csd == CSD_YES) {
|
|
||||||
for (int i = 0; i < ALEN(term->window->csd.surface); i++)
|
|
||||||
wl_subsurface_set_sync(term->window->csd.sub_surface[i]);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
cursor_refresh(term);
|
cursor_refresh(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue