mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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:
parent
380cd056ec
commit
0f7b2864d0
6 changed files with 60 additions and 67 deletions
10
ui/sdl.c
10
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue