[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 26/52] ui/vc: move cursor_timer initialization to QemuTextConsole
From: |
marcandre . lureau |
Subject: |
[PULL 26/52] ui/vc: move cursor_timer initialization to QemuTextConsole class |
Date: |
Mon, 4 Sep 2023 15:52:23 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
The timer is only relevant when a text console exists.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230830093843.3531473-27-marcandre.lureau@redhat.com>
---
ui/console.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ui/console.c b/ui/console.c
index 8c4a2c83fa..ffa68c3a22 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1399,6 +1399,10 @@ qemu_text_console_finalize(Object *obj)
static void
qemu_text_console_class_init(ObjectClass *oc, void *data)
{
+ if (!cursor_timer) {
+ cursor_timer = timer_new_ms(QEMU_CLOCK_REALTIME,
+ text_console_update_cursor, NULL);
+ }
}
static void
@@ -2144,8 +2148,6 @@ static DisplayState *get_alloc_displaystate(void)
{
if (!display_state) {
display_state = g_new0(DisplayState, 1);
- cursor_timer = timer_new_ms(QEMU_CLOCK_REALTIME,
- text_console_update_cursor, NULL);
}
return display_state;
}
--
2.41.0
- [PULL 14/52] ui/vc: fold text_update_xy(), (continued)
- [PULL 14/52] ui/vc: fold text_update_xy(), marcandre . lureau, 2023/09/04
- [PULL 13/52] ui/vc: replace variable with static text attributes default, marcandre . lureau, 2023/09/04
- [PULL 15/52] ui/vc: pass VCCharDev to VC-specific functions, marcandre . lureau, 2023/09/04
- [PULL 16/52] ui/vc: move VCCharDev specific fields out of QemuConsole, marcandre . lureau, 2023/09/04
- [PULL 17/52] ui/console: use OBJECT_DEFINE_TYPE for QemuConsole, marcandre . lureau, 2023/09/04
- [PULL 18/52] ui/console: change new_console() to use object initialization, marcandre . lureau, 2023/09/04
- [PULL 20/52] ui/console: instantiate a specific console type, marcandre . lureau, 2023/09/04
- [PULL 19/52] ui/console: introduce different console objects, marcandre . lureau, 2023/09/04
- [PULL 21/52] ui/console: register the console from qemu_console_init(), marcandre . lureau, 2023/09/04
- [PULL 23/52] ui/console: specialize console_lookup_unused(), marcandre . lureau, 2023/09/04
- [PULL 26/52] ui/vc: move cursor_timer initialization to QemuTextConsole class,
marcandre . lureau <=
- [PULL 27/52] ui/console: free more QemuConsole resources, marcandre . lureau, 2023/09/04
- [PULL 24/52] ui/console: update the head from unused QemuConsole, marcandre . lureau, 2023/09/04
- [PULL 22/52] ui/console: remove new_console(), marcandre . lureau, 2023/09/04
- [PULL 28/52] ui/vc: move text fields to QemuTextConsole, marcandre . lureau, 2023/09/04
- [PULL 25/52] ui/console: allocate ui_timer in QemuConsole, marcandre . lureau, 2023/09/04
- [PULL 29/52] ui/console: move graphic fields to QemuGraphicConsole, marcandre . lureau, 2023/09/04
- [PULL 30/52] ui/vc: fold text_console_do_init() in vc_chr_open(), marcandre . lureau, 2023/09/04
- [PULL 31/52] ui/vc: move some text console initialization to qom handlers, marcandre . lureau, 2023/09/04
- [PULL 32/52] ui/console: simplify getting active_console size, marcandre . lureau, 2023/09/04
- [PULL 35/52] ui/console: declare console types in console.h, marcandre . lureau, 2023/09/04