[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 10/18] ui: set cursor position upon listener registration
From: |
marcandre . lureau |
Subject: |
[PULL v2 10/18] ui: set cursor position upon listener registration |
Date: |
Tue, 14 Mar 2023 00:01:26 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
---
ui/console.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ui/console.c b/ui/console.c
index 35f8274aab..f3783021e5 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -95,6 +95,7 @@ struct QemuConsole {
QemuUIInfo ui_info;
QEMUTimer *ui_timer;
QEMUCursor *cursor;
+ int cursor_x, cursor_y, cursor_on;
const GraphicHwOps *hw_ops;
void *hw;
@@ -1665,6 +1666,9 @@ void register_displaychangelistener(DisplayChangeListener
*dcl)
if (con && con->cursor && dcl->ops->dpy_cursor_define) {
dcl->ops->dpy_cursor_define(dcl, con->cursor);
}
+ if (con && dcl->ops->dpy_mouse_set) {
+ dcl->ops->dpy_mouse_set(dcl, con->cursor_x, con->cursor_y,
con->cursor_on);
+ }
text_console_update_cursor(NULL);
}
@@ -1909,6 +1913,9 @@ void dpy_mouse_set(QemuConsole *con, int x, int y, int on)
DisplayState *s = con->ds;
DisplayChangeListener *dcl;
+ con->cursor_x = x;
+ con->cursor_y = y;
+ con->cursor_on = on;
if (!qemu_console_is_visible(con)) {
return;
}
--
2.39.2
- [PULL v2 00/18] Display patches, marcandre . lureau, 2023/03/13
- [PULL v2 01/18] ui/dbus: initialize cursor_fb, marcandre . lureau, 2023/03/13
- [PULL v2 02/18] ui/dbus: unregister clipboard on connection close, marcandre . lureau, 2023/03/13
- [PULL v2 03/18] audio/dbus: there are no sender for p2p mode, marcandre . lureau, 2023/03/13
- [PULL v2 04/18] ui/dbus: set mouse is-absolute during console creation, marcandre . lureau, 2023/03/13
- [PULL v2 05/18] meson: ensure dbus-display generated code is built before other units, marcandre . lureau, 2023/03/13
- [PULL v2 06/18] ui: rename cursor_{put->unref}, marcandre . lureau, 2023/03/13
- [PULL v2 07/18] ui: rename cursor_{get->ref}, return it, marcandre . lureau, 2023/03/13
- [PULL v2 08/18] ui: keep current cursor with QemuConsole, marcandre . lureau, 2023/03/13
- [PULL v2 10/18] ui: set cursor position upon listener registration,
marcandre . lureau <=
- [PULL v2 11/18] ui/sdl: get the GL context from the window, marcandre . lureau, 2023/03/13
- [PULL v2 09/18] ui: set cursor upon listener registration, marcandre . lureau, 2023/03/13
- [PULL v2 12/18] ui/shader: fix #version directive must occur on first line, marcandre . lureau, 2023/03/13
- [PULL v2 13/18] ui/egl: print EGL error, helping debugging, marcandre . lureau, 2023/03/13
- [PULL v2 15/18] ui/sdl: try to instantiate the matching opengl renderer, marcandre . lureau, 2023/03/13
- [PULL v2 14/18] ui/sdl: add QEMU_ENABLE_SDL_LOGGING setting/environment, marcandre . lureau, 2023/03/13
- [PULL v2 16/18] ui: introduce egl_init(), marcandre . lureau, 2023/03/13
- [PULL v2 17/18] ui/dbus: do not require opengl & gbm, marcandre . lureau, 2023/03/13
- [PULL v2 18/18] ui/dbus: restrict opengl to gbm-enabled config, marcandre . lureau, 2023/03/13