qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 94400f: ui/gtk: fix passing y0_top parameter


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 94400f: ui/gtk: fix passing y0_top parameter to scanout
Date: Mon, 29 May 2023 14:28:27 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 94400fa53f81c9f58ad88cf3f3e7ea89ec423d39
      
https://github.com/qemu/qemu/commit/94400fa53f81c9f58ad88cf3f3e7ea89ec423d39
  Author: Erico Nunes <ernunes@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M ui/gtk-egl.c
    M ui/gtk-gl-area.c

  Log Message:
  -----------
  ui/gtk: fix passing y0_top parameter to scanout

The dmabuf->y0_top flag is passed to .dpy_gl_scanout_dmabuf(), however
in the gtk ui both implementations dropped it when doing the next
scanout_texture call.

Fixes flipped linux console using vhost-user-gpu with the gtk ui
display.

Signed-off-by: Erico Nunes <ernunes@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230220175605.43759-1-ernunes@redhat.com>


  Commit: 2f31663ed4b5631b5e1c79f5cdd6463e55410eb8
      
https://github.com/qemu/qemu/commit/2f31663ed4b5631b5e1c79f5cdd6463e55410eb8
  Author: Erico Nunes <ernunes@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M ui/gtk.c

  Log Message:
  -----------
  ui/gtk: use widget size for cursor motion event

The gd_motion_event size has some calculations for the cursor position,
which also take into account things like different size of the
framebuffer compared to the window size.
The use of window size makes things more difficult though, as at least
in the case of Wayland includes the size of ui elements like a menu bar
at the top of the window. This leads to a wrong position calculation by
a few pixels.
Fix it by using the size of the widget, which already returns the size
of the actual space to render the framebuffer.

Signed-off-by: Erico Nunes <ernunes@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Message-Id: <20230320160856.364319-1-ernunes@redhat.com>


  Commit: f8a951bb951140a585341c700ebeec58d83f7bbc
      
https://github.com/qemu/qemu/commit/f8a951bb951140a585341c700ebeec58d83f7bbc
  Author: Erico Nunes <ernunes@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M ui/gtk-egl.c

  Log Message:
  -----------
  ui/gtk-egl: fix scaling for cursor position in scanout mode

vc->gfx.w and vc->gfx.h are not updated appropriately in this code path,
which leads to a different scaling factor for rendering the cursor on
some edge cases (e.g. the focus has left and re-entered the gtk window).
This can be reproduced using vhost-user-gpu with the gtk ui on the x11
backend.
Use the surface dimensions which are already updated accordingly.

Signed-off-by: Erico Nunes <ernunes@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230320160856.364319-2-ernunes@redhat.com>


  Commit: b3a654d82ecf276b59a67b2fd688e11a0d8a0064
      
https://github.com/qemu/qemu/commit/b3a654d82ecf276b59a67b2fd688e11a0d8a0064
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M ui/sdl2-gl.c

  Log Message:
  -----------
  ui/sdl2: fix surface_gl_update_texture: Assertion 'gls' failed

Before sdl2_gl_update() is called, sdl2_gl_switch() may decide to
destroy the console window and its associated shaders.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1644
Fixes: c84ab0a500a8 ("ui/console: optionally update after gfx switch")

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Tested-by: Bin Meng <bin.meng@windriver.com>
Message-Id: <20230511074217.4171842-1-marcandre.lureau@redhat.com>


  Commit: 0b31e48d62c8f3a282d1bffbcc0e90200df9f9f0
      
https://github.com/qemu/qemu/commit/0b31e48d62c8f3a282d1bffbcc0e90200df9f9f0
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M ui/dbus-listener.c

  Log Message:
  -----------
  ui/dbus: fix compilation when GBM && !OPENGL

commit 4814d3cbf ("ui/dbus: restrict opengl to gbm-enabled config")
assumes that whenever GBM is available, OpenGL is. This is not always
the case, let's further restrict opengl-related paths and fix some
compilation issues.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230515132348.1024663-1-marcandre.lureau@redhat.com>


  Commit: d89f30b4df13dfe389a4d6cf8a30b2f87c4c166e
      
https://github.com/qemu/qemu/commit/d89f30b4df13dfe389a4d6cf8a30b2f87c4c166e
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M include/sysemu/os-win32.h
    M util/oslib-win32.c

  Log Message:
  -----------
  win32: wrap socket close() with an exception handler

Since commit abe34282 ("win32: avoid mixing SOCKET and file descriptor
space"), we set HANDLE_FLAG_PROTECT_FROM_CLOSE on the socket FD, to
prevent closing the HANDLE with CloseHandle. This raises an exception
which under gdb is fatal, and qemu exits.

Let's catch the expected error instead.

Note: this appears to work, but the mingw64 macro is not well documented
or tested, and it's not obvious how it is meant to be used.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230515132440.1025315-1-marcandre.lureau@redhat.com>


  Commit: 529969b8d03970bae5feef8c69ebf5e0f521131c
      
https://github.com/qemu/qemu/commit/529969b8d03970bae5feef8c69ebf5e0f521131c
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M hw/display/virtio-gpu.c

  Log Message:
  -----------
  virtio-gpu: add a FIXME for virtio_gpu_load()

It looks like the virtio_gpu_load() does not compute and set the offset,
the same way virtio_gpu_set_scanout() does. This probably results in
incorrect display until the scanout/framebuffer is updated again, I
guess we should fix it, although I haven't checked this yet.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230515132518.1025853-1-marcandre.lureau@redhat.com>


  Commit: 57430aa4af740b995f848511cb8dac996ce1d792
      
https://github.com/qemu/qemu/commit/57430aa4af740b995f848511cb8dac996ce1d792
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M ui/gtk.c

  Log Message:
  -----------
  gtk: add gl-area support on win32

On Windows, we don't use the low-level GBM/EGL helpers (no dmabuf etc),
we can turn on GL area support for the rest of rendering.

(fwiw, GDK backend may be either WGL or EGL)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Tested-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20230515132527.1026064-1-marcandre.lureau@redhat.com>


  Commit: da1d066c1b68efd33fcca9e4d84fa499db459679
      
https://github.com/qemu/qemu/commit/da1d066c1b68efd33fcca9e4d84fa499db459679
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M ui/dbus-listener.c

  Log Message:
  -----------
  ui/dbus: add a FIXME about texture/dmabuf scanout handling

Except SDL, display backends seem to fail at handing full scanout
geometry correctly. It would need some test/reproducer to actually check
it. In the meantime, fill some missing fields, and leave a FIXME.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230515132537.1026310-1-marcandre.lureau@redhat.com>


  Commit: efc00a37090eced53bff8b42d26991252aaacc44
      
https://github.com/qemu/qemu/commit/efc00a37090eced53bff8b42d26991252aaacc44
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M ui/sdl2.c

  Log Message:
  -----------
  ui/sdl2: Grab Alt+Tab also in fullscreen mode

By default, SDL grabs Alt+Tab only in non-fullscreen mode. This causes Alt+Tab
to switch tasks on the host rather than in the VM in fullscreen mode while it
switches tasks in non-fullscreen mode in the VM. Fix this confusing behavior
by grabbing Alt+Tab in fullscreen mode, always causing tasks to be switched in
the VM.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20230417192139.43263-2-shentey@gmail.com>


  Commit: 083db9db44c89d7ea7f81844302194d708bcff2b
      
https://github.com/qemu/qemu/commit/083db9db44c89d7ea7f81844302194d708bcff2b
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M ui/sdl2.c

  Log Message:
  -----------
  ui/sdl2: Grab Alt+F4 also under Windows

SDL doesn't grab Alt+F4 under Windows by default. Pressing Alt+F4 thus closes
the VM immediately without confirmation, possibly leading to data loss. Fix
this by always grabbing Alt+F4 on Windows hosts, too.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20230417192139.43263-3-shentey@gmail.com>


  Commit: 1dfea3f212e43bfd59d1e1f40b9776db440b211f
      
https://github.com/qemu/qemu/commit/1dfea3f212e43bfd59d1e1f40b9776db440b211f
  Author: Volker Rümelin <vr_qemu@t-online.de>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M ui/sdl2.c

  Log Message:
  -----------
  ui/sdl2: disable SDL_HINT_GRAB_KEYBOARD on Windows

Windows sends an extra left control key up/down input event for
every right alt key up/down input event for keyboards with
international layout. Since commit 830473455f ("ui/sdl2: fix
handling of AltGr key on Windows") QEMU uses a Windows low level
keyboard hook procedure to reliably filter out the special left
control key and to grab the keyboard on Windows.

The SDL2 version 2.0.16 introduced its own Windows low level
keyboard hook procedure to grab the keyboard. Windows calls this
callback before the QEMU keyboard hook procedure. This disables
the special left control key filter when the keyboard is grabbed.

To fix the problem, disable the SDL2 Windows low level keyboard
hook procedure.

Reported-by: Bernhard Beschow <shentey@gmail.com>
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20230418062823.5683-1-vr_qemu@t-online.de>


  Commit: 4c93ce54e7114aae33100d2ee4f2b36e451a1d06
      
https://github.com/qemu/qemu/commit/4c93ce54e7114aae33100d2ee4f2b36e451a1d06
  Author: Mauro Matteo Cascella <mcascell@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M include/ui/console.h
    M ui/cursor.c

  Log Message:
  -----------
  ui/cursor: make width/height unsigned 16-bit integer

Although not actually exploitable at the moment, a negative width/height
could make datasize wrap around and potentially lead to buffer overflow.
Since there is no reason a negative width/height is ever appropriate,
modify QEMUCursor struct and cursor_alloc prototype to accept uint16_t.
This protects us against accidentally introducing future bugs.

Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Reported-by: Jacek Halon <jacek.halon@gmail.com>
Reported-by: Yair Mizrahi <yairh33@gmail.com>
Reported-by: Elsayed El-Refa'ei <e.elrefaei99@gmail.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230523163023.608121-1-mcascell@redhat.com>


  Commit: 944ae6d9f17c3c6609f8d0832311b7a050d6c4b6
      
https://github.com/qemu/qemu/commit/944ae6d9f17c3c6609f8d0832311b7a050d6c4b6
  Author: Sergio Lopez <slp@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M hw/input/virtio-input-hid.c

  Log Message:
  -----------
  virtio-input: generalize virtio_input_key_config()

As there are other bitmap-based config properties that need to be dealt in a
similar fashion as VIRTIO_INPUT_CFG_EV_BITS, generalize the function to
receive select and subsel as arguments, and rename it to
virtio_input_extend_config()

Signed-off-by: Sergio Lopez <slp@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230526112925.38794-2-slp@redhat.com>


  Commit: 2bfb10dff2a21e42708aa4aef4bb64e8e3674858
      
https://github.com/qemu/qemu/commit/2bfb10dff2a21e42708aa4aef4bb64e8e3674858
  Author: Sergio Lopez <slp@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M include/ui/input.h
    M qapi/ui.json
    M replay/replay-input.c
    M ui/input.c
    M ui/trace-events

  Log Message:
  -----------
  ui: add the infrastructure to support MT events

Add the required infrastructure to support generating multitouch events.

Signed-off-by: Sergio Lopez <slp@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230526112925.38794-3-slp@redhat.com>


  Commit: 8e9ebd7523915900dad0cab6eb807c773c37b5fc
      
https://github.com/qemu/qemu/commit/8e9ebd7523915900dad0cab6eb807c773c37b5fc
  Author: Sergio Lopez <slp@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M hw/input/virtio-input-hid.c
    M include/hw/virtio/virtio-input.h

  Log Message:
  -----------
  virtio-input: add a virtio-mulitouch device

Add a virtio-multitouch device to the family of devices emulated by
virtio-input implementing the Multi-touch protocol as descripted here:

https://www.kernel.org/doc/html/latest/input/multi-touch-protocol.html?highlight=multi+touch

This patch just add the device itself, without connecting it to any
backends. The following patches will add a PCI-based multitouch device,
some helpers in "ui" and will enable the GTK3 backend to transpose
multi-touch events from the host to the guest.

Signed-off-by: Sergio Lopez <slp@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230526112925.38794-4-slp@redhat.com>


  Commit: 4b2321c96638bb4ed401c448d7f5b475ff7b341d
      
https://github.com/qemu/qemu/commit/4b2321c96638bb4ed401c448d7f5b475ff7b341d
  Author: Sergio Lopez <slp@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M hw/virtio/virtio-input-pci.c

  Log Message:
  -----------
  virtio-input-pci: add virtio-multitouch-pci

Add virtio-multitouch-pci, a Multitouch-capable input device, to the
list of devices that can be provided by virtio-input-pci.

Signed-off-by: Sergio Lopez <slp@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230526112925.38794-5-slp@redhat.com>


  Commit: f6157392d4e4047c56bc81da0de0e64617bf2785
      
https://github.com/qemu/qemu/commit/f6157392d4e4047c56bc81da0de0e64617bf2785
  Author: Sergio Lopez <slp@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M include/ui/input.h
    M ui/input.c

  Log Message:
  -----------
  ui: add helpers for virtio-multitouch events

Add helpers for generating Multi-touch events from the UI backends that
can be sent to the guest through a virtio-multitouch device.

Signed-off-by: Sergio Lopez <slp@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230526112925.38794-6-slp@redhat.com>


  Commit: 5a4cb61ae1ab0068ab53535ed0ccaf41a5e97d2f
      
https://github.com/qemu/qemu/commit/5a4cb61ae1ab0068ab53535ed0ccaf41a5e97d2f
  Author: Sergio Lopez <slp@redhat.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M ui/gtk.c

  Log Message:
  -----------
  ui/gtk: enable backend to send multi-touch events

GTK3 provides the infrastructure to receive and process multi-touch
events through the "touch-event" signal and the GdkEventTouch type.
Make use of it to transpose events from the host to the guest.

This allows users of machines with hardware capable of receiving
multi-touch events to run guests that can also receive those events
and interpret them as gestures, when appropriate.

An example of this in action can be seen here:

 https://fosstodon.org/@slp/109545849296546767

Signed-off-by: Sergio Lopez <slp@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230526112925.38794-7-slp@redhat.com>


  Commit: 57b93c0f8ea3901661990de74aef15b44aea5556
      
https://github.com/qemu/qemu/commit/57b93c0f8ea3901661990de74aef15b44aea5556
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-05-29 (Mon, 29 May 2023)

  Changed paths:
    M hw/display/virtio-gpu.c
    M hw/input/virtio-input-hid.c
    M hw/virtio/virtio-input-pci.c
    M include/hw/virtio/virtio-input.h
    M include/sysemu/os-win32.h
    M include/ui/console.h
    M include/ui/input.h
    M qapi/ui.json
    M replay/replay-input.c
    M ui/cursor.c
    M ui/dbus-listener.c
    M ui/gtk-egl.c
    M ui/gtk-gl-area.c
    M ui/gtk.c
    M ui/input.c
    M ui/sdl2-gl.c
    M ui/sdl2.c
    M ui/trace-events
    M util/oslib-win32.c

  Log Message:
  -----------
  Merge tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu into 
staging

UI queue

- virtio: add virtio-multitouch device
- sdl: various keyboard grab fixes
- gtk: enable multi-touch events
- misc fixes

# -----BEGIN PGP SIGNATURE-----
#
# iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmRzVQAcHG1hcmNhbmRy
# ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5a34D/9+1I9XnecCQk4rZhHI
# Fb1fUei4eLNOdxTZUK2zpOkArWf59VNsEa1LFqIiM+0IlWU3gQmrCLRFOuJrDxiA
# ugq9H23QLs3Z7HEab6/aq+VwUy+o1AXowLZBTrEGmw9SZQnrKeu4/prW0f5wbsTf
# u5ALDkJWo733vkbAplsfWPcOLzp3CoTvA89iw/I9eNVYsm6+vBJ+0cRBr0GCPmiJ
# 2xprhGkie491clNlbR3HmOX/RGFmcj/ClPraLXepaQq1gNCqurIrU7V3J/JcY5W0
# YemXDEgpZ8iVt1OOKGKzTftGZzuhRpxAYvSPwjAp1XeEXB7eJEmjUWoFpyVt1tQZ
# 4y6pQGYdM2XW0sbAkt3w2TIgj/odv7L3IHG3UcsBRefl6Pm43G1FuGWjbulQ1ch0
# YyFAr1xNPkWMYSW1MTb4vuTYFO9OEY08W4n+M6O187RUFiuf+W00OZUDqpp6zjqT
# LKjMktilpUOya1LvWU3D5et9LEXFgSrZj9rQlFsuMe3g24ZNPLypQh/jzSFs9ZsW
# At1nIGGrrZDr8YMFnANBudJbJc0Q1+ce5TB6090XSpNn/YXvu2H+n/ceA4/mA6sy
# MlQBrDmifb9iY6+62MbW8wJtiIy8Zi7A632pw8gbqB0ilkg4DNSBR5O42n1Fmhqp
# gLfxN48NN9Bx6H+zPJbwz2aDQQ==
# =3bPI
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 28 May 2023 06:20:00 AM PDT
# 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]

* tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu:
  ui/gtk: enable backend to send multi-touch events
  ui: add helpers for virtio-multitouch events
  virtio-input-pci: add virtio-multitouch-pci
  virtio-input: add a virtio-mulitouch device
  ui: add the infrastructure to support MT events
  virtio-input: generalize virtio_input_key_config()
  ui/cursor: make width/height unsigned 16-bit integer
  ui/sdl2: disable SDL_HINT_GRAB_KEYBOARD on Windows
  ui/sdl2: Grab Alt+F4 also under Windows
  ui/sdl2: Grab Alt+Tab also in fullscreen mode
  ui/dbus: add a FIXME about texture/dmabuf scanout handling
  gtk: add gl-area support on win32
  virtio-gpu: add a FIXME for virtio_gpu_load()
  win32: wrap socket close() with an exception handler
  ui/dbus: fix compilation when GBM && !OPENGL
  ui/sdl2: fix surface_gl_update_texture: Assertion 'gls' failed
  ui/gtk-egl: fix scaling for cursor position in scanout mode
  ui/gtk: use widget size for cursor motion event
  ui/gtk: fix passing y0_top parameter to scanout

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/ac84b57b4d74...57b93c0f8ea3



reply via email to

[Prev in Thread] Current Thread [Next in Thread]