console: gui timer fixes

Make gui update rate adaption code in gui_update() actually work.
Sprinkle in a tracepoint so you can see the code at work.  Remove
the update rate adaption code in vnc and make vnc simply use the
generic bits instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2013-03-14 11:56:16 +01:00
parent 380cd056ec
commit 0f7b2864d0
6 changed files with 60 additions and 67 deletions

View file

@ -751,12 +751,12 @@ static void handle_activation(SDL_Event *ev)
if (ev->active.state & SDL_APPACTIVE) {
if (ev->active.gain) {
/* Back to default interval */
dcl->gui_timer_interval = 0;
dcl->idle = 0;
update_displaychangelistener(dcl, GUI_REFRESH_INTERVAL_DEFAULT);
} else {
/* Sleeping interval */
dcl->gui_timer_interval = 500;
dcl->idle = 1;
/* Sleeping interval. Not using the long default here as
* sdl_refresh does not only update the guest screen, but
* also checks for gui events. */
update_displaychangelistener(dcl, 500);
}
}
}