diff options
| author | Stefan Hajnoczi <stefanha@redhat.com> | 2025-05-25 09:50:54 -0400 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@redhat.com> | 2025-05-25 09:50:54 -0400 |
| commit | 6f388a37e6dc2df4457692afe6adb5448b7db31d (patch) | |
| tree | c7e8dbc79b70b26d3da2ce03f4092dcd93c0e838 /include | |
| parent | 668df86ee8076152320345d8e36be7c95ec0a09a (diff) | |
| parent | f05e1a93f48729b568fdf86a12d56ee142cee5e1 (diff) | |
| download | focaccia-qemu-6f388a37e6dc2df4457692afe6adb5448b7db31d.tar.gz focaccia-qemu-6f388a37e6dc2df4457692afe6adb5448b7db31d.zip | |
Merge tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging
UI-related - vdagent migration support - gtk: improve scale handling # -----BEGIN PGP SIGNATURE----- # # iQJQBAABCgA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmgyAywcHG1hcmNhbmRy # ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5TbTD/4/3da55xtH0yVSol+G # T6S7F1GKUbSCi0y/t+PiG2usiE17euZ+m1mKBAOT2kObehS3gWybIreNBZ3IAPZg # Hm8RoIU6yStui2RZ/rKx2d1P2nq3mMmaB7uToHwPl6KsO2hYm75zmXCGH6oBI+ah # muNkxzsIky9qnOaKeZRODPkPiG1LXfte0IYV6wkpBcXUqE595rQfD9WDuOJ7WKJe # T1GiwxdClZGBM6SahDhfwdoFx1yTk8rTtTdYM0K3W7xMQGvCKLGQHDmS7JeQ1lm3 # 42H3kh760UwNqSyk4L0TWZiGrsEWCsbU7heiRLeVL/FBA8N2TWL6xKB/xSO4duJ3 # v63652/rNh18AFnSRu0CaIBwf/hXfLpU/cKv/Sqmm2X8FjD7dLMyaAHCz1BC0acU # +VA8JKRu7F5GbsisaYyG4lY6u8IBw9sq/FhyNBflBy3MQl0v4PV5x1eqDbGT1560 # k2bQbIChumn8U4TmEA1IHDFX45cdxZmlgnt7yq+SUn5/CmRJrXAlacPRje4A4omL # YS3Y1Qn4X7sXyIdoHvxofng2NU0nfZX9az27aXsGkRNtzjibZzjl8rJKcaCx0LGQ # uFJwA+ArCJjTJ3EB09373iGixW0Vuv4dM4IkNp+QGoCOVH0jeER6bs9cNROG6WmS # e1nWuW0hZgmdusw1S0ncxFc+YA== # =SjRP # -----END PGP SIGNATURE----- # gpg: Signature made Sat 24 May 2025 13:34:36 EDT # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "marcandre.lureau@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full] # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu: ui/gtk-egl: Render guest content with padding in fixed-scale mode ui/gtk-gl-area: Render guest content with padding in fixed-scale mode ui/gtk: Consider scaling when propagating ui info ui/gtk: Don't update scale in fixed scale mode in gtk-egl.c ui/sdl: Consider scaling in mouse event handling ui/gtk: Update scales in fixed-scale mode when rendering GL area gtk/ui: Introduce helper gd_update_scale ui/gtk: Use consistent naming for variables in different coordinates ui/gtk: Document scale and coordinate handling ui/vdagent: remove migration blocker ui/vdagent: add migration support ui/vdagent: factor out clipboard peer registration ui/vdagent: keep "connected" state ui/vdagent: replace Buffer with GByteArray ui/clipboard: delay clipboard update when not running ui/clipboard: add vmstate_cbinfo ui/clipboard: split out QemuClipboardContent ui/clipboard: use int for selection field ui/gtk: warn if setting the clipboard failed Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/ui/clipboard.h | 31 | ||||
| -rw-r--r-- | include/ui/egl-helpers.h | 4 | ||||
| -rw-r--r-- | include/ui/gtk.h | 2 |
3 files changed, 29 insertions, 8 deletions
diff --git a/include/ui/clipboard.h b/include/ui/clipboard.h index ab6acdbd8a..62a96ce9ff 100644 --- a/include/ui/clipboard.h +++ b/include/ui/clipboard.h @@ -2,6 +2,7 @@ #define QEMU_CLIPBOARD_H #include "qemu/notify.h" +#include "migration/vmstate.h" /** * DOC: Introduction @@ -25,6 +26,9 @@ typedef enum QemuClipboardSelection QemuClipboardSelection; typedef struct QemuClipboardPeer QemuClipboardPeer; typedef struct QemuClipboardNotify QemuClipboardNotify; typedef struct QemuClipboardInfo QemuClipboardInfo; +typedef struct QemuClipboardContent QemuClipboardContent; + +extern const VMStateDescription vmstate_cbinfo; /** * enum QemuClipboardType @@ -97,6 +101,24 @@ struct QemuClipboardNotify { }; }; + +/** + * struct QemuClipboardContent + * + * @available: whether the data is available + * @requested: whether the data was requested + * @size: the size of the @data + * @data: the clipboard data + * + * Clipboard content. + */ +struct QemuClipboardContent { + bool available; + bool requested; + uint32_t size; + void *data; +}; + /** * struct QemuClipboardInfo * @@ -112,15 +134,10 @@ struct QemuClipboardNotify { struct QemuClipboardInfo { uint32_t refcount; QemuClipboardPeer *owner; - QemuClipboardSelection selection; + int selection; /* QemuClipboardSelection */ bool has_serial; uint32_t serial; - struct { - bool available; - bool requested; - size_t size; - void *data; - } types[QEMU_CLIPBOARD_TYPE__COUNT]; + QemuClipboardContent types[QEMU_CLIPBOARD_TYPE__COUNT]; }; /** diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h index fb80e15142..acf993fcf5 100644 --- a/include/ui/egl-helpers.h +++ b/include/ui/egl-helpers.h @@ -17,6 +17,8 @@ extern bool qemu_egl_angle_d3d; typedef struct egl_fb { int width; int height; + int x; + int y; GLuint texture; GLuint framebuffer; bool delete_texture; @@ -26,7 +28,7 @@ typedef struct egl_fb { #define EGL_FB_INIT { 0, } void egl_fb_destroy(egl_fb *fb); -void egl_fb_setup_default(egl_fb *fb, int width, int height); +void egl_fb_setup_default(egl_fb *fb, int width, int height, int x, int y); void egl_fb_setup_for_tex(egl_fb *fb, int width, int height, GLuint texture, bool delete); void egl_fb_setup_new_tex(egl_fb *fb, int width, int height); diff --git a/include/ui/gtk.h b/include/ui/gtk.h index aa3d637029..d3944046db 100644 --- a/include/ui/gtk.h +++ b/include/ui/gtk.h @@ -224,4 +224,6 @@ int gd_gl_area_make_current(DisplayGLCtx *dgc, /* gtk-clipboard.c */ void gd_clipboard_init(GtkDisplayState *gd); +void gd_update_scale(VirtualConsole *vc, int ww, int wh, int fbw, int fbh); + #endif /* UI_GTK_H */ |