mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
ui: keep current cursor with QemuConsole
Keeping the current cursor around is useful, not only for VNC, but for other displays. Let's move it down, see the following patches for other usages. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
2512a026fa
commit
385ac97f8f
4 changed files with 11 additions and 6 deletions
|
@ -94,6 +94,7 @@ struct QemuConsole {
|
|||
uint32_t head;
|
||||
QemuUIInfo ui_info;
|
||||
QEMUTimer *ui_timer;
|
||||
QEMUCursor *cursor;
|
||||
const GraphicHwOps *hw_ops;
|
||||
void *hw;
|
||||
|
||||
|
@ -1923,6 +1924,8 @@ void dpy_cursor_define(QemuConsole *con, QEMUCursor *cursor)
|
|||
DisplayState *s = con->ds;
|
||||
DisplayChangeListener *dcl;
|
||||
|
||||
cursor_unref(con->cursor);
|
||||
con->cursor = cursor_ref(cursor);
|
||||
if (!qemu_console_is_visible(con)) {
|
||||
return;
|
||||
}
|
||||
|
@ -2288,6 +2291,11 @@ QemuConsole *qemu_console_lookup_unused(void)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
QEMUCursor *qemu_console_get_cursor(QemuConsole *con)
|
||||
{
|
||||
return con->cursor;
|
||||
}
|
||||
|
||||
bool qemu_console_is_visible(QemuConsole *con)
|
||||
{
|
||||
return (con == active_console) || (con->dcls > 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue