main: Add _immediate suffix
parent
1f84086ecd
commit
338ccec704
14
src/main.c
14
src/main.c
|
@ -678,14 +678,14 @@ static void render_from_vnc(void)
|
||||||
vnc_client_clear_av_frames(window->vnc);
|
vnc_client_clear_av_frames(window->vnc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void on_vnc_client_update_fb(struct vnc_client* client)
|
void on_vnc_client_update_fb_immediate(struct vnc_client* client)
|
||||||
{
|
{
|
||||||
get_frame_damage(window->vnc, &window->current_damage);
|
get_frame_damage(window->vnc, &window->current_damage);
|
||||||
render_from_vnc();
|
render_from_vnc();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_frame_callback(void* data, struct wl_callback* callback,
|
static void handle_frame_callback_immediate(void* data,
|
||||||
uint32_t time)
|
struct wl_callback* callback, uint32_t time)
|
||||||
{
|
{
|
||||||
wl_callback_destroy(callback);
|
wl_callback_destroy(callback);
|
||||||
window->is_frame_committed = false;
|
window->is_frame_committed = false;
|
||||||
|
@ -694,14 +694,14 @@ static void handle_frame_callback(void* data, struct wl_callback* callback,
|
||||||
render_from_vnc();
|
render_from_vnc();
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct wl_callback_listener frame_listener = {
|
static const struct wl_callback_listener frame_listener_immediate = {
|
||||||
.done = handle_frame_callback
|
.done = handle_frame_callback_immediate
|
||||||
};
|
};
|
||||||
|
|
||||||
static void register_frame_callback(void)
|
static void register_frame_callback(void)
|
||||||
{
|
{
|
||||||
struct wl_callback* callback = wl_surface_frame(window->wl_surface);
|
struct wl_callback* callback = wl_surface_frame(window->wl_surface);
|
||||||
wl_callback_add_listener(callback, &frame_listener, NULL);
|
wl_callback_add_listener(callback, &frame_listener_immediate, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void on_vnc_client_event(void* obj)
|
void on_vnc_client_event(void* obj)
|
||||||
|
@ -1020,7 +1020,7 @@ int main(int argc, char* argv[])
|
||||||
vnc->userdata = window;
|
vnc->userdata = window;
|
||||||
|
|
||||||
vnc->alloc_fb = on_vnc_client_alloc_fb;
|
vnc->alloc_fb = on_vnc_client_alloc_fb;
|
||||||
vnc->update_fb = on_vnc_client_update_fb;
|
vnc->update_fb = on_vnc_client_update_fb_immediate;
|
||||||
vnc->ntp_event = on_ntp_event;
|
vnc->ntp_event = on_ntp_event;
|
||||||
|
|
||||||
if (vnc_client_set_pixel_format(vnc, shm_format) < 0) {
|
if (vnc_client_set_pixel_format(vnc, shm_format) < 0) {
|
||||||
|
|
Loading…
Reference in New Issue