qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] e251b5: ui/gtk: Remove NULL checks in gd_swit


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] e251b5: ui/gtk: Remove NULL checks in gd_switch
Date: Fri, 12 Mar 2021 09:47:32 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: e251b5876383cac918b2cd03be034a5d24310b87
      
https://github.com/qemu/qemu/commit/e251b5876383cac918b2cd03be034a5d24310b87
  Author: Akihiko Odaki <akihiko.odaki@gmail.com>
  Date:   2021-03-11 (Thu, 11 Mar 2021)

  Changed paths:
    M ui/gtk.c

  Log Message:
  -----------
  ui/gtk: Remove NULL checks in gd_switch

c821a58ee7 ("ui/console: Pass placeholder surface to display")
eliminated the possibility that NULL is passed as surface to
dpy_gfx_switch and removed some NULL checks from gd_switch, but the
removal was not thoroughly. Remaining NULL checks were confusing for
Coverity and probably also for humans. This change removes those NULL
checks.

Reported-by: Coverity (CID 1448421)
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210308140713.17901-1-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


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

  Changed paths:
    M ui/cocoa.m

  Log Message:
  -----------
  ui/cocoa: Use kCGColorSpaceSRGB

kCGColorSpaceGenericRGB | Apple Developer Documentation
https://developer.apple.com/documentation/coregraphics/kcgcolorspacegenericrgb
> Deprecated
> Use kCGColorSpaceSRGB instead.

This change also removes the legacy color space specification for
PowerPC.

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


  Commit: e26804031d772670a8901c24599cda323719e6f9
      
https://github.com/qemu/qemu/commit/e26804031d772670a8901c24599cda323719e6f9
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2021-03-11 (Thu, 11 Mar 2021)

  Changed paths:
    M docs/system/removed-features.rst

  Log Message:
  -----------
  docs: Fix removal text of -show-cursor

We should say now when it was removed, not when it was deprecated.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210310045821.1004396-1-thuth@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>


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

  Changed paths:
    M ui/cocoa.m

  Log Message:
  -----------
  ui/cocoa: Show QEMU icon in the about window

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


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

  Changed paths:
    M ui/cocoa.m

  Log Message:
  -----------
  ui/cocoa: Do not rely on the first argument

The first argument of the executable was used to get its path, but it is
not reliable because the executer can specify any arbitrary string. Use the
interfaces provided by QEMU and the platform to get those paths.

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


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

  Changed paths:
    M ui/cocoa.m

  Log Message:
  -----------
  ui/cocoa: Clear modifiers whenever possible

ui/cocoa does not receive NSEventTypeFlagsChanged when it is not active,
and the modifier state can be desynchronized in such a situation.

[NSEvent -modifierFlags] tells whether a modifier is *not* pressed, so
check it whenever receiving an event and clear the modifier if it is not
pressed.

Note that [NSEvent -modifierFlags] does not tell if a certain modifier
*is* pressed because the documented mask for [NSEvent -modifierFlags]
generalizes left shift and right shift, for example. CapsLock is the
only exception. The pressed state is synchronized only with
NSEventTypeFlagsChanged.

This change also removes modifier keys from keycode map. If they
are input with NSEventTypeKeyDown or NSEventTypeKeyUp, it leads to
desynchronization. Although such a situation is not observed, they are
removed just in case.

Moreover, QKbdState is introduced for automatic key state tracking.

Thanks to Konstantin Nazarov for testing and finding a bug in this
change:
https://gist.github.com/akihikodaki/87df4149e7ca87f18dc56807ec5a1bc5#gistcomment-3659419

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


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

  Changed paths:
    M ui/cocoa.m

  Log Message:
  -----------
  ui/cocoa: Mark variables static

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


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

  Changed paths:
    M ui/cocoa.m

  Log Message:
  -----------
  ui/cocoa: Fix mouse association state

ui/cocoa deassociates the mouse input and the mouse cursor
position only when relative movement inputs are expected. Such
inputs may let the mouse cursor leave the view and cause undesired
side effects if they are associated. On the other hand, the
problem does not occur when inputting absolute points, and the
association allows seamless cursor movement across views.

However, the synchronization of the association and the expected
input type was only done when grabbing the mouse. In reality, the
state whether the emulated input device expects absolute pointing
inputs or relative movement inputs can vary dynamically due to
USB device hot-plugging, for example.

This change adds association state updates according to input type
expectation changes. It also removes an internal flag representing
the association state because the state can now be determined with
the current input type expectation and it only adds the
complexity of the state tracking.

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


  Commit: 3f8d1885e48e4d72eab0688f604de62e0aea7a38
      
https://github.com/qemu/qemu/commit/3f8d1885e48e4d72eab0688f604de62e0aea7a38
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-03-12 (Fri, 12 Mar 2021)

  Changed paths:
    M docs/system/removed-features.rst
    M ui/cocoa.m
    M ui/gtk.c

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

ui: mostly cocoa fixes

# gpg: Signature made Thu 11 Mar 2021 12:33:51 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-20210311-pull-request:
  ui/cocoa: Fix mouse association state
  ui/cocoa: Mark variables static
  ui/cocoa: Clear modifiers whenever possible
  ui/cocoa: Do not rely on the first argument
  ui/cocoa: Show QEMU icon in the about window
  docs: Fix removal text of -show-cursor
  ui/cocoa: Use kCGColorSpaceSRGB
  ui/gtk: Remove NULL checks in gd_switch

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


Compare: https://github.com/qemu/qemu/compare/1941858448e7...3f8d1885e48e



reply via email to

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