[Top][All Lists]

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

[Qemu-commits] [qemu/qemu] dc3c89: ui/cocoa.m: replace scrollingDeltaY w

From: GitHub
Subject: [Qemu-commits] [qemu/qemu] dc3c89: ui/cocoa.m: replace scrollingDeltaY with deltaY
Date: Thu, 12 Jul 2018 08:50:37 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: dc3c89d612252fc461a65f54885a1fe108e9ec05
  Author: John Arbuckle <address@hidden>
  Date:   2018-07-12 (Thu, 12 Jul 2018)

  Changed paths:
    M ui/cocoa.m

  Log Message:
  ui/cocoa.m: replace scrollingDeltaY with deltaY

The NSEvent class method scrollingDeltaY is available
for Mac OS 10.7 and newer. Since QEMU supports Mac OS
10.5 and up, we need to be using a method that is
available on these version of Mac OS X. The deltaY
method is a method that does almost the same thing as
scrollingDeltaY and is available on Mac OS 10.5 and
up. So we can replace scrollingDeltaY with deltaY.

We only check deltaY's value if it is not zero
because zero means that the scrolling increment was
sufficiently fine that it was only reported in scrollingDeltaY,
or that the scrolling was horizontal.

Signed-off-by: John Arbuckle <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
[PMM: tweak commit message and comment a little]
Signed-off-by: Peter Maydell <address@hidden>

      **NOTE:** This service been marked for deprecation: 

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

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