render: render-timer: position sub-surface similar to the scrollback indicator

This commit is contained in:
Daniel Eklöf 2020-08-14 07:48:40 +02:00
parent 394db77b04
commit 640445acb4
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 5 additions and 1 deletions

View file

@ -1502,6 +1502,11 @@ render_render_timer(struct terminal *term, struct timeval render_time)
struct buffer *buf = shm_get_buffer(
term->wl->shm, width, height, cookie, false, 1);
wl_subsurface_set_position(
win->render_timer_sub_surface,
margin / term->scale,
(term->margins.top + term->cell_height - margin) / term->scale);
render_osd(
term,
win->render_timer_surface, win->render_timer_sub_surface,

View file

@ -1212,7 +1212,6 @@ wayl_win_init(struct terminal *term)
wayl->sub_compositor, win->render_timer_surface, win->surface);
wl_subsurface_set_sync(win->render_timer_sub_surface);
wl_surface_set_user_data(win->render_timer_surface, win);
wl_subsurface_set_position(win->render_timer_sub_surface, 10, 10);
wl_surface_commit(win->render_timer_surface);
}
return win;