From patchwork Tue Jul 3 04:13:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Programmingkid X-Patchwork-Id: 10502927 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 288F660325 for ; Tue, 3 Jul 2018 04:14:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17F2928874 for ; Tue, 3 Jul 2018 04:14:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BC4028A86; Tue, 3 Jul 2018 04:14:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AA34328874 for ; Tue, 3 Jul 2018 04:14:45 +0000 (UTC) Received: from localhost ([::1]:37722 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faCiC-00046u-HG for patchwork-qemu-devel@patchwork.kernel.org; Tue, 03 Jul 2018 00:14:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faChZ-0003gE-Ta for qemu-devel@nongnu.org; Tue, 03 Jul 2018 00:14:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1faChU-0004Yx-UZ for qemu-devel@nongnu.org; Tue, 03 Jul 2018 00:14:05 -0400 Received: from mail-it0-x243.google.com ([2607:f8b0:4001:c0b::243]:54625) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1faChU-0004Ye-QF for qemu-devel@nongnu.org; Tue, 03 Jul 2018 00:14:00 -0400 Received: by mail-it0-x243.google.com with SMTP id s7-v6so1257412itb.4 for ; Mon, 02 Jul 2018 21:14:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=7nrr+xKIxLU2VZ4smYcBWb9QjQNv62NrZAZoELrLelA=; b=SWIHRkhyyq1bTlI1UEupjrDp0SOHmve0Mc8skMXMlKaQ5/pCWaRi8b6aR4JP4qIq2d UsYaYclKtSa3tkdbnDILD4NQJ0Hh+50BbvUi652fl6lTZKb6ebF9cichoOE1+SLGdW28 yxkRSD07fpxB0wZCj2u6pSxn8bf3N/3v8DX2707V5rf7bcj7TKDgCp80GCB1P8Tmj/2P lYQcST6o9ulKUy8Y6WjE0MUL+bd3P3qvFx6ZLOl9VK5Nwu2H5hraQFmhgfUdsNm9zbM4 3OQmSB7Xs/HomOuPGNTsf9mTvfXLXxjGC8wK0rfJtw8OaXEgycR6nYTZpyE11Fs/0heX E5wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7nrr+xKIxLU2VZ4smYcBWb9QjQNv62NrZAZoELrLelA=; b=DVlwrDLxyKiQjEXM6xrzkj4/cycFWTGHY5qDMBwazBMOPfYnB8L2GxlX6j5wO3Y9PV Tn2V4xFVs8S/pEx8Q9mJYHNcR+mLpmmyECU2NlC+v7xt9B+G1hMbuh8C22lvhGG/XbLQ DUTjbVTyO+APNBKLZQ5v7JG9YVejRjUMVPO0KvdUUe9AMZJhxvHM3NK9pPsiiLpW3LER kRKBnxrpCx1U+/DdeVAywcaciMMcaLIZNn11kGDg9TbabliUo4LVfKwBIaaI5tNRv+ZV GDyWq8Wnl+Wfa91xBvP8f5PLaYgke66jbt69IM9yKaQisQRkyZ5yN41UL3Ld0To54+i2 Ayqw== X-Gm-Message-State: APt69E2ksrjQE/y0bvFw8QdfurAW5SwOo53MkYnYkkQSDSSFhrY3pF2n 2nvj0Sw9Iiefe1uZOnDdNz8= X-Google-Smtp-Source: AAOMgpcclAqJ652Zb0OAWw8JV20YTrfRfClDqnTKppUBG6rnBFqY26FoSrmoSEiJpZXn5rT7igufOA== X-Received: by 2002:a24:4587:: with SMTP id c7-v6mr8576844itd.151.1530591240079; Mon, 02 Jul 2018 21:14:00 -0700 (PDT) Received: from localhost.localdomain ([69.14.184.20]) by smtp.gmail.com with ESMTPSA id v128-v6sm74632ioe.34.2018.07.02.21.13.58 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 02 Jul 2018 21:13:59 -0700 (PDT) From: John Arbuckle To: peter.maydell@linaro.org, qemu-devel@nongnu.org Date: Tue, 3 Jul 2018 00:13:43 -0400 Message-Id: <20180703041343.2014-1-programmingkidx@gmail.com> X-Mailer: git-send-email 2.14.3 (Apple Git-98) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::243 Subject: [Qemu-devel] [PATCH] ui/cocoa.m: replace scrollingDeltaY with deltaY X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Arbuckle Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 the same thing as scrollingDeltaY and is available on Mac OS 10.5 and up. So we simply replace scrollingDeltaY with deltaY. Signed-off-by: John Arbuckle --- ui/cocoa.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 2991ed4f19..e34714081d 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -803,7 +803,7 @@ - (void) handleEvent:(NSEvent *)event */ /* Determine if this is a scroll up or scroll down event */ - buttons = ([event scrollingDeltaY] > 0) ? + buttons = ([event deltaY] > 0) ? INPUT_BUTTON_WHEEL_UP : INPUT_BUTTON_WHEEL_DOWN; qemu_input_queue_btn(dcl->con, buttons, true); qemu_input_event_sync();