From patchwork Wed Jun 28 19:37:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Programmingkid X-Patchwork-Id: 781892 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wyY3d038Mz9s0g for ; Thu, 29 Jun 2017 05:37:48 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="PCnGUgsh"; dkim-atps=neutral Received: from localhost ([::1]:35416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQImV-0003Is-AP for incoming@patchwork.ozlabs.org; Wed, 28 Jun 2017 15:37:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQImD-0003IX-Mj for qemu-devel@nongnu.org; Wed, 28 Jun 2017 15:37:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQIm8-0000Bu-Po for qemu-devel@nongnu.org; Wed, 28 Jun 2017 15:37:25 -0400 Received: from mail-it0-x244.google.com ([2607:f8b0:4001:c0b::244]:35762) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dQIm8-0000BP-Kl for qemu-devel@nongnu.org; Wed, 28 Jun 2017 15:37:20 -0400 Received: by mail-it0-x244.google.com with SMTP id v193so5547920itc.2 for ; Wed, 28 Jun 2017 12:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:subject:date:message-id:cc:to :mime-version; bh=qN6nkfjkk8YHPG4LogEfP6q+pFOcuv+HNA388xTET0o=; b=PCnGUgshMaLg7i2p9yWpANnVo9/umB3IOrYvvaKARHRi7Kg0bHJDnK/eDO2he/aeme DLh1lEm/Dwy5rsY2zHoVuiMjow2h2AlH/7j0E0HM4roYcajz4JjjTUT8DwQ2vGrNUtC/ NgaOfYV6uei9D8RIGcOFvlM96PoR8Stcc0llupzMJXAm3CyIo4VbqP9dqlV5+weNcibg 5zRgZGMuCCOvclDyikyjOdo0h3YpvgTYRPLJt3huAQrPeBnXVCGcA1iesAcnTamOiLt2 DjXhcJKmBA/hhAyHu81U4MUozW9Y+R2/CM7phiuIQQwi3bluJAdjRCvB72nhuOSPqJFl H+pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:subject:date :message-id:cc:to:mime-version; bh=qN6nkfjkk8YHPG4LogEfP6q+pFOcuv+HNA388xTET0o=; b=auKc31C0RrlfMC+x4PxjhJbeDavsg329heIyHEvBvu/NkdHmkfNOU7SItwTX30fqjZ kFCZMIliT81Wn/wNOwB51DOjJwict1phI8JMefGJk/EjER908I4YbmgaxjXT7XLEbuda Xkeng6zDWrMvnQIlRRxTurwDURlKo9pzlKIWMt8xmcUNI6yrdGneWbbNOAkRoh0aB7yz Sk1nLezd0AlL+4q+2vnbczDUpwYCYUtYnXHn7bHMi5dqiVNwpiwKA4NyEaKkBL8M2lFy D64aMnuGjs61PO3eTPaMZg4i+k4bu9OGdxgJUwU2TDfsF5x7g9BvfSLU1xGKO9q5R2aX z++Q== X-Gm-Message-State: AKS2vOzsbMO7QNyFDvzlf70ty4ByEC7GChlZcB3ECPfeLu6EEe2as/HX NsAlslKEN+TV7A== X-Received: by 10.36.98.206 with SMTP id d197mr10077248itc.50.1498678638380; Wed, 28 Jun 2017 12:37:18 -0700 (PDT) Received: from [192.168.0.4] (d199-74-164-53.col.wideopenwest.com. [74.199.53.164]) by smtp.gmail.com with ESMTPSA id 79sm3315223itj.15.2017.06.28.12.37.17 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Jun 2017 12:37:17 -0700 (PDT) From: Programmingkid Date: Wed, 28 Jun 2017 15:37:16 -0400 Message-Id: To: Peter Maydell Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::244 Subject: [Qemu-devel] [PATCH] ui/cocoa.m: Fix compatibility issue with Mac OS 10.9 and under 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: "qemu-devel@nongnu.org qemu-devel" Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The [NSEvent modifierFlags] method returns an NSEventModifierFlags type value in Mac OS 10.10. It use to be of type NSUInteger. Replacing NSEventModifierFlags with NSUInteger allows for the cooca.m file to be compiled on older versions of Mac OS. This patch was been tested on Mac OS 10.6 and Mac OS 10.12 without problem. 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 9e81285..93e56d0 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -571,7 +571,7 @@ QemuCocoaView *cocoaView; // bitmask. if (qemu_console_is_graphic(NULL)) { - NSEventModifierFlags modifiers = [event modifierFlags]; + NSUInteger modifiers = [event modifierFlags]; if (!!(modifiers & NSEventModifierFlagCapsLock) != !!modifiers_state[Q_KEY_CODE_CAPS_LOCK]) { [self toggleStatefulModifier:Q_KEY_CODE_CAPS_LOCK];