aboutsummaryrefslogtreecommitdiff
path: root/ui/sdl.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-03-14 11:56:16 +0100
committerGerd Hoffmann <kraxel@redhat.com>2013-04-16 09:03:49 +0200
commit0f7b2864d0d0c3ef2801f9214d8c510c80a220d1 (patch)
tree2223119758f09c83a125f6335c483618910e8569 /ui/sdl.c
parent380cd056ec0e7fc8bbd553cdcb061d3ca612bb82 (diff)
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>
Diffstat (limited to 'ui/sdl.c')
-rw-r--r--ui/sdl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/sdl.c b/ui/sdl.c
index ede31dc794..97764a683f 100644
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -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);
}
}
}