From nobody Mon Feb 9 04:11:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1580576814349979.9458271635116; Sat, 1 Feb 2020 09:06:54 -0800 (PST) Received: from localhost ([::1]:48174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixwEO-0004eA-AF for importer@patchew.org; Sat, 01 Feb 2020 12:06:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44029) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixwDH-0004Fd-LH for qemu-devel@nongnu.org; Sat, 01 Feb 2020 12:05:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ixwDD-00028K-8q for qemu-devel@nongnu.org; Sat, 01 Feb 2020 12:05:43 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:50390) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ixwDD-000275-1N for qemu-devel@nongnu.org; Sat, 01 Feb 2020 12:05:39 -0500 Received: by mail-wm1-x330.google.com with SMTP id a5so11358139wmb.0 for ; Sat, 01 Feb 2020 09:05:38 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id o4sm17266215wrx.25.2020.02.01.09.05.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Feb 2020 09:05:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vJZdGsFepjnpm6WZn1dpww8GMlowz78uy3Ennd3ZNH8=; b=FvtLEIen8dECoa/cmWKa709ELjTV32pXMjntxvtPLD5ckR0BhgRlSMo0liLD7L/xFQ /IHnUrgU1GXgzE1Jayi9uJjfDS+1z3sSOrQ6nPZ0+4WtMWmi+kqVAx2A2oYJsO6slEnz NMfNbbfVTNNsV4IPqDiowuaXpStUFarXp3OSnb2S2lssrXKY6LkUDLTBlwWqxS/4mAMC EJ6iEaBAhPXJz3HqAMANAZzym5EjdB1dZMGneZuuMdDmCcAa69bdPBj7M7CvByGQGGyn TmurHSDhzgBKlGFTMVdZQoPJ63CU8WvoJyGJPm9xjNrQ/g/AZ0QQY2QRpFvZ0bOY215Q TJtw== 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:mime-version :content-transfer-encoding; bh=vJZdGsFepjnpm6WZn1dpww8GMlowz78uy3Ennd3ZNH8=; b=E0mLikRdHj7TaEWwnyjiW1vr1pP/R/Br+lCEKG6fg14xrCpzF3akieuaBPu+BxC2yn KV1rD9J5uiqSVj6oWhwGbCmBi6mmWTiJ0hxDF34XmUpQeiEF6rAW6b0E8QHE8QK67dXD vVOvS/RIceUSR+o07KIoMPTmtPI8r8BBKbsViy16ivvDnVxuIWM8SYzvVtcrsKZW1l6b DmkHSyJZGMTbF7uHvQ5glLaciBSwu6IemFN//2f99ah7mpUQUWCpse3BIBYA34czrhpE Oz2oa6bGMb61FpH7OMo/vjtcCLAHVTJF80+1KB1lybRPCScqnE6JDyeRQqfkxWGwsUOc WG+g== X-Gm-Message-State: APjAAAXM53a/RqPfDX5Pmblvc9IaSy91g1euU76YxEn1XQeHpJp+GfE0 RHQncH+oKQ1JxYyYvSzX38ZRjnR/G29luA== X-Google-Smtp-Source: APXvYqzTW8FV48zDWwppsYE6OhjLG4Gv7q0pl6F58+U+eT95oloLbbHWupSGXSFpf0h1J+5xG1qVow== X-Received: by 2002:a7b:c932:: with SMTP id h18mr18823891wml.171.1580576736706; Sat, 01 Feb 2020 09:05:36 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH] ui/cocoa: Drop workarounds for pre-10.12 OSX Date: Sat, 1 Feb 2020 17:05:34 +0000 Message-Id: <20200201170534.22123-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::330 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Our official OSX support policy covers the last two released versions. Currently that is 10.14 and 10.15. We also may work on older versions, but don't guarantee it. In commit 50290c002c045280f8d in mid-2019 we introduced some uses of CLOCK_MONOTONIC which incidentally broke compilation for pre-10.12 OSX versions (see LP:1861551). We don't intend to fix that, so we might as well drop the code in ui/cocoa.m which caters for pre-10.12 versions as well. (For reference, 10.11 fell out of Apple extended security support in September 2018.) Signed-off-by: Peter Maydell --- The bug report is recent, but this was also pointed out on the mailing list back in June 2019. Since nobody has cared to try to fix it, we clearly don't care about 10.11 in practice as well as in theory.] --- ui/cocoa.m | 59 ------------------------------------------------------ 1 file changed, 59 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index fbb5b1b45f..f9945bc712 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -42,60 +42,10 @@ #include #include "hw/core/cpu.h" =20 -#ifndef MAC_OS_X_VERSION_10_5 -#define MAC_OS_X_VERSION_10_5 1050 -#endif -#ifndef MAC_OS_X_VERSION_10_6 -#define MAC_OS_X_VERSION_10_6 1060 -#endif -#ifndef MAC_OS_X_VERSION_10_9 -#define MAC_OS_X_VERSION_10_9 1090 -#endif -#ifndef MAC_OS_X_VERSION_10_10 -#define MAC_OS_X_VERSION_10_10 101000 -#endif -#ifndef MAC_OS_X_VERSION_10_12 -#define MAC_OS_X_VERSION_10_12 101200 -#endif #ifndef MAC_OS_X_VERSION_10_13 #define MAC_OS_X_VERSION_10_13 101300 #endif =20 -/* macOS 10.12 deprecated many constants, #define the new names for older = SDKs */ -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 -#define NSEventMaskAny NSAnyEventMask -#define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask -#define NSEventModifierFlagShift NSShiftKeyMask -#define NSEventModifierFlagCommand NSCommandKeyMask -#define NSEventModifierFlagControl NSControlKeyMask -#define NSEventModifierFlagOption NSAlternateKeyMask -#define NSEventTypeFlagsChanged NSFlagsChanged -#define NSEventTypeKeyUp NSKeyUp -#define NSEventTypeKeyDown NSKeyDown -#define NSEventTypeMouseMoved NSMouseMoved -#define NSEventTypeLeftMouseDown NSLeftMouseDown -#define NSEventTypeRightMouseDown NSRightMouseDown -#define NSEventTypeOtherMouseDown NSOtherMouseDown -#define NSEventTypeLeftMouseDragged NSLeftMouseDragged -#define NSEventTypeRightMouseDragged NSRightMouseDragged -#define NSEventTypeOtherMouseDragged NSOtherMouseDragged -#define NSEventTypeLeftMouseUp NSLeftMouseUp -#define NSEventTypeRightMouseUp NSRightMouseUp -#define NSEventTypeOtherMouseUp NSOtherMouseUp -#define NSEventTypeScrollWheel NSScrollWheel -#define NSTextAlignmentCenter NSCenterTextAlignment -#define NSWindowStyleMaskBorderless NSBorderlessWindowMask -#define NSWindowStyleMaskClosable NSClosableWindowMask -#define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask -#define NSWindowStyleMaskTitled NSTitledWindowMask -#endif -/* 10.13 deprecates NSFileHandlingPanelOKButton in favour of - * NSModalResponseOK, which was introduced in 10.9. Define - * it for older versions. - */ -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9 -#define NSModalResponseOK NSFileHandlingPanelOKButton -#endif /* 10.14 deprecates NSOnState and NSOffState in favor of * NSControlStateValueOn/Off, which were introduced in 10.13. * Define for older versions @@ -465,11 +415,7 @@ - (void) drawRect:(NSRect) rect COCOA_DEBUG("QemuCocoaView: drawRect\n"); =20 // get CoreGraphic context -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10 - CGContextRef viewContextRef =3D [[NSGraphicsContext currentContext] gr= aphicsPort]; -#else CGContextRef viewContextRef =3D [[NSGraphicsContext currentContext] CG= Context]; -#endif =20 CGContextSetInterpolationQuality (viewContextRef, kCGInterpolationNone= ); CGContextSetShouldAntialias (viewContextRef, NO); @@ -1075,9 +1021,7 @@ - (void) raiseAllKeys ------------------------------------------------------ */ @interface QemuCocoaAppController : NSObject -#if (MAC_OS_X_VERSION_MAX_ALLOWED >=3D MAC_OS_X_VERSION_10_6) -#endif { } - (void)doToggleFullScreen:(id)sender; @@ -1126,9 +1070,6 @@ - (id) init [normalWindow setAcceptsMouseMovedEvents:YES]; [normalWindow setTitle:@"QEMU"]; [normalWindow setContentView:cocoaView]; -#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10) - [normalWindow useOptimizedDrawing:YES]; -#endif [normalWindow makeKeyAndOrderFront:self]; [normalWindow center]; [normalWindow setDelegate: self]; --=20 2.17.2 (Apple Git-113)