qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 1e8b6f: ui/cocoa: Remove the uses of full scr


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 1e8b6f: ui/cocoa: Remove the uses of full screen APIs
Date: Thu, 04 Mar 2021 05:04:36 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 1e8b6f2b4989d3d2567befa00cd9c4430190f433
      
https://github.com/qemu/qemu/commit/1e8b6f2b4989d3d2567befa00cd9c4430190f433
  Author: Akihiko Odaki <akihiko.odaki@gmail.com>
  Date:   2021-03-03 (Wed, 03 Mar 2021)

  Changed paths:
    M ui/cocoa.m

  Log Message:
  -----------
  ui/cocoa: Remove the uses of full screen APIs

The detections of [NSView -enterFullScreen:] and
[NSView -exitFullScreen:] were wrong. A detection is coded as:
[NSView respondsToSelector:@selector(exitFullScreenModeWithOptions:)]
but it should be:
[NSView instancesRespondToSelector:@selector(exitFullScreenModeWithOptions:)]

Because of those APIs were not detected, ui/cocoa always falled
back to a borderless window whose frame matches the screen to
implement fullscreen behavior.

The code using [NSView -enterFullScreen:] and
[NSView -exitFullScreen:] will be used if you fix the detections,
but its behavior is undesirable; the full screen view stretches
the video, changing the aspect ratio, even if zooming is disabled.

This change removes the code as it does nothing good.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20210220013138.51437-1-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 8eb13bbbac08aa077efcf9877c9646c4497d766c
      
https://github.com/qemu/qemu/commit/8eb13bbbac08aa077efcf9877c9646c4497d766c
  Author: Zack Marvel <zpmarvel@gmail.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M ui/gtk.c

  Log Message:
  -----------
  ui/gtk: vte: fix sending multiple characeters

When using the GTK UI with libvte, multicharacter keystrokes are not
sent correctly (such as arrow keys). gd_vc_in should check the
CharBackend's can_receive instead of assuming multiple characters can be
received. This is not an issue for e.g. the SDL UI because
qemu_chr_be_write is called with len=1 for each character (SDL sends
more than once keystroke).

Modify gd_vc_in to call qemu_chr_be_write multiple times if necessary.

Buglink: https://bugs.launchpad.net/qemu/+bug/1407808

Signed-off-by: Zack Marvel <zpmarvel@gmail.com>
Message-Id: <20210221170613.13183-2-zpmarvel@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: d9c32b8f7f5f05511d77a1ec1d1d35bf7bff2961
      
https://github.com/qemu/qemu/commit/d9c32b8f7f5f05511d77a1ec1d1d35bf7bff2961
  Author: Akihiko Odaki <akihiko.odaki@gmail.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M ui/cocoa.m

  Log Message:
  -----------
  ui/cocoa: Fix stride resolution of pixman image

A display can receive an image which its stride is greater than its
width. In fact, when a guest requests virtio-gpu to scan out a
smaller part of an image, virtio-gpu passes it to a display as an
image which its width represents the one of the part and its stride
equals to the one of the whole image.

This change makes ui/cocoa to cover such cases.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20210222144012.21486-1-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: bc6a3565c89243f0aaa24bac6dc37fb52b16d5c5
      
https://github.com/qemu/qemu/commit/bc6a3565c89243f0aaa24bac6dc37fb52b16d5c5
  Author: Akihiko Odaki <akihiko.odaki@gmail.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M configure
    M docs/interop/vhost-user.json
    M include/ui/egl-helpers.h
    M include/ui/spice-display.h
    M meson.build
    M ui/egl-helpers.c
    M ui/gtk-egl.c
    M ui/gtk-gl-area.c
    M ui/gtk.c
    M ui/meson.build

  Log Message:
  -----------
  configure: Improve OpenGL dependency detections

This has the following visible changes:

- GBM is required only for OpenGL dma-buf.
- X11 is explicitly required by gtk-egl.
- EGL is now mandatory for the OpenGL displays.

The last one needs some detailed description. Before this change,
EGL was tested only for OpenGL dma-buf with the check of
EGL_MESA_image_dma_buf_export. However, all of the OpenGL
displays depend on EGL and EGL_MESA_image_dma_buf_export is always
defined by epoxy's EGL interface.
Therefore, it makes more sense to always check the presence of EGL
and say the OpenGL displays are available along with OpenGL dma-buf
if it is present.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20210223060307.87736-1-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: 4313739a57a34998ebaf032dcdda065c0105a939
      
https://github.com/qemu/qemu/commit/4313739a57a34998ebaf032dcdda065c0105a939
  Author: Akihiko Odaki <akihiko.odaki@gmail.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M ui/cocoa.m

  Log Message:
  -----------
  ui/cocoa: Replace fprintf with error_report

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210223131106.21166-1-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: b5a087b071b6d4752234d8c190cc7f22f44ec2e9
      
https://github.com/qemu/qemu/commit/b5a087b071b6d4752234d8c190cc7f22f44ec2e9
  Author: Akihiko Odaki <akihiko.odaki@gmail.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M hw/display/vhost-user-gpu.c
    M hw/display/virtio-gpu.c
    M include/ui/console.h
    M ui/console.c
    M ui/vnc.c

  Log Message:
  -----------
  ui/console: Add placeholder flag to message surface

The surfaces created with former qemu_create_message_surface
did not display the content from the guest and always contained
simple messages describing the reason.

A display backend may want to hide the window showing such a
surface. This change renames the function to
qemu_create_placeholder_surface, and adds "placeholder" flag; the
display can check the flag to decide to do anything special like
hiding the window.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20210225101316.83940-1-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: c821a58ee7003c2a0567dddaee33c2a5ae71c404
      
https://github.com/qemu/qemu/commit/c821a58ee7003c2a0567dddaee33c2a5ae71c404
  Author: Akihiko Odaki <akihiko.odaki@gmail.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M ui/console.c
    M ui/gtk.c
    M ui/sdl2-2d.c
    M ui/sdl2-gl.c
    M ui/spice-display.c
    M ui/vnc.c

  Log Message:
  -----------
  ui/console: Pass placeholder surface to displays

ui/console used to accept NULL as graphic console surface, but its
semantics was inconsistent among displays:
- cocoa and gtk-egl perform NULL dereference.
- egl-headless, spice and spice-egl do nothing.
- gtk releases underlying resources.
- sdl2-2d and sdl2-gl destroys the window.
- vnc shows a message, "Display output is not active."

Fortunately, only virtio-gpu and virtio-gpu-3d assign NULL so
we can study them to figure out the desired behavior. They assign
NULL *except* for the primary display when the device is realized,
reset, or its scanout is disabled. This effectively destroys
windows for the (uninitialized) secondary displays.

To implement the consistent behavior of display device
realization/reset, this change embeds it to the operation
switching the surface. When NULL was given as a new surface when
switching, ui/console will instead passes a placeholder down
to each display listeners.

sdl destroys the window for a secondary console if its surface is a
placeholder. The other displays simply shows the placeholder.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20210225101316.83940-2-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: ed8f3fe6898e0f3fea2ece7c87464a06098b2300
      
https://github.com/qemu/qemu/commit/ed8f3fe6898e0f3fea2ece7c87464a06098b2300
  Author: Akihiko Odaki <akihiko.odaki@gmail.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M hw/display/vhost-user-gpu.c
    M hw/display/virtio-gpu-3d.c
    M hw/display/virtio-gpu-base.c
    M hw/display/virtio-gpu.c

  Log Message:
  -----------
  virtio-gpu: Do not distinguish the primary console

In the past, virtio-gpu set NULL as the surface for the secondary
consoles to hide its window. The distinction is now handled in
ui/console and the display backends and virtio-gpu does no longer
have to do that.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20210225101316.83940-3-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


  Commit: fe352f5c0056b4d21ae033ec49acc0bce9897e53
      
https://github.com/qemu/qemu/commit/fe352f5c0056b4d21ae033ec49acc0bce9897e53
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M configure
    M docs/interop/vhost-user.json
    M hw/display/vhost-user-gpu.c
    M hw/display/virtio-gpu-3d.c
    M hw/display/virtio-gpu-base.c
    M hw/display/virtio-gpu.c
    M include/ui/console.h
    M include/ui/egl-helpers.h
    M include/ui/spice-display.h
    M meson.build
    M ui/cocoa.m
    M ui/console.c
    M ui/egl-helpers.c
    M ui/gtk-egl.c
    M ui/gtk-gl-area.c
    M ui/gtk.c
    M ui/meson.build
    M ui/sdl2-2d.c
    M ui/sdl2-gl.c
    M ui/spice-display.c
    M ui/vnc.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kraxel/tags/ui-20210304-pull-request' 
into staging

ui/console: message surface tweaks.
ui/cocoa: bugfixes and cleanups.

# gpg: Signature made Thu 04 Mar 2021 08:36:53 GMT
# gpg:                using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20210304-pull-request:
  virtio-gpu: Do not distinguish the primary console
  ui/console: Pass placeholder surface to displays
  ui/console: Add placeholder flag to message surface
  ui/cocoa: Replace fprintf with error_report
  configure: Improve OpenGL dependency detections
  ui/cocoa: Fix stride resolution of pixman image
  ui/gtk: vte: fix sending multiple characeters
  ui/cocoa: Remove the uses of full screen APIs

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/cb90ecf93491...fe352f5c0056



reply via email to

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