From patchwork Thu May 2 14:29:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 794109 Delivered-To: patch@linaro.org Received: by 2002:adf:a153:0:b0:34d:5089:5a9e with SMTP id r19csp279005wrr; Thu, 2 May 2024 07:29:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU8u3WfnYVuzbCz+2RkCzsuVB8RZtqrMSmzAjjJIMaTf1y3L5xrLDTiUvf/1+nGLaXcPgTkNjznhM7a3jq2xPKz X-Google-Smtp-Source: AGHT+IFIVu7xU0f/ZE4QPhpmnUeRFoh9g7tLiptQWQ1uUqI2rie6K0D2Ah7xgBB93vJFrYwAUR04 X-Received: by 2002:a54:460c:0:b0:3c6:d4d:5810 with SMTP id p12-20020a54460c000000b003c60d4d5810mr6139889oip.49.1714660162497; Thu, 02 May 2024 07:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714660162; cv=none; d=google.com; s=arc-20160816; b=XiLEtx/vq3Npu3OdBlv+6bVjlxUSf1Q28egaPSByhoq0550tBhzVEdp4Iw8gwvg9bK cLZbrnrSHb5zapIQjwmsQG85/qE4XFWvcVzt9PVrW5BI21C5T5cvjl8u6Wy7Lu30bGaN hnDw6bIV4tqTb20lzpOjzYLoFqUeQjS091Ck9MoUHzvckTW+smwFZMIW0HQGoQW0gEoO xI6S5SKjKMTbJpqTyR13DIbH+zeM0bt/1WwTfJSi3C12+eYD+hb6hS7/BV9h6FrtrpCY JWqji4bVAknhbnQ1P5ImP4D7dLZIdcfKVonhLA+b6Jm5fscHi5E1e95FBw/Cf87nDIwv GT0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=IzTYQxXA15CKrEh25p1hdM44GrHltJy7g46cuEmtUgk=; fh=z9o6GZ4h8Nq2RnkvLI9oTwb979esY+FaylymtpnpZus=; b=BuneIqgdqiH6SjeFqBMUaI4zN9ZcqhM7v3VaMQOHgqBQqQ8rE//PR11TOT5EnC7/qI B72f1ovhGDTrHJZDESpS5ri0bfdc+HYHfCwfvhaJgdVSTRDUUZzdPb/otoG/3lqBgcdM ZNutbIJM+1SVI/Ss+qtEWMjB0GoStaScjMGtOKGc7BcNj+aQXYbI+zmefGRkNWf3TnXt kobWWQsRadtMOfnnKuhHJ+R1fA2K52l/Q5iJnMGVVGVVBN215M7ZlH7DLgeQPj2KZubz bdV5sbWKiR3y3cnlCJ6JtntQtLFOYHlYb/JT1YBHfWMivFWher8tUWv8rJvbquR1fHlQ p6hg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wWVrNXch; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c10-20020a056214224a00b006a0b9c0d957si1045946qvc.434.2024.05.02.07.29.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 May 2024 07:29:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wWVrNXch; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2XQv-0000DF-4s; Thu, 02 May 2024 10:29:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2XQt-0000CO-QK for qemu-devel@nongnu.org; Thu, 02 May 2024 10:29:11 -0400 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2XQs-0001kV-9Q for qemu-devel@nongnu.org; Thu, 02 May 2024 10:29:11 -0400 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2db101c11beso95490711fa.0 for ; Thu, 02 May 2024 07:29:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714660148; x=1715264948; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IzTYQxXA15CKrEh25p1hdM44GrHltJy7g46cuEmtUgk=; b=wWVrNXchnPLh1SRRR1TfzgoHSZweZGXwTNOrrFpiL7lVyoWGZG1Z7CXKP3hnhdG0b9 xsREAXChX6J00raKaQtR3+nxs5ryrvdfMs1gf5Y8TDOG808xiACYxT6U3yVBjqE7+nW4 ipNuHn444pO4CCaKyR961PK+Uq31fZRI/UbjoQnj5UQdsl6HtP6x4nwhGJk4Xt3dd8F6 1As82PYifq6m+nZ9r9diUSu2NifxjfuLN/OUSW5xIm9caDc3Hk7ufMYcbU1O+3doH5GZ Q5j+p9wEKR4TmIW1axBloLHVyvsQsHXZelUxh06qHO+Uj4+IPXdx7JbiCAvVyQm9f3Sq guSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714660148; x=1715264948; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IzTYQxXA15CKrEh25p1hdM44GrHltJy7g46cuEmtUgk=; b=D+0ZVkcnrATdZ2gEAvgENubLxv0IDgub7HI2IjV1/j5+FBJRrNjOo7141QDdlGY1Q7 aTIemYqbnohoZz3irHcJcQwnhuTpVNT8YIOtUyDlpnL0XMkUZWEZUVLxvFehpm8qwioE E37Ed6IQAg+Ub4vGwAX1RCSBEaqi/GD60BYbEZ+iLLBraqX6SA22+UnVNf081pfigzCV WA1t36HHiMbETuQv6eacLBiTShrj2xX/XoJewriOumXc0yMxEFNx7/qEENUhTypF2TPe yPivMbeKnqGZ8f/SL0kZbXIBdOOFYWdzvrkbhUjhkIUF04FYCS21n3hUBaLLfjBynkwU STcA== X-Gm-Message-State: AOJu0YySX5fsahwUPm+Ox91LTa+p2kI28ZvnlMHKu8thKq5JQo6rqeih /l5479xDoGPeJw3fjZMJ/g/ms6Zy1hifijqG8OKAquZP1OQK4IwnaPl2e3Jabo6OHqSG2iDQyrN x X-Received: by 2002:a2e:a167:0:b0:2df:b800:5bff with SMTP id u7-20020a2ea167000000b002dfb8005bffmr3603651ljl.7.1714660146338; Thu, 02 May 2024 07:29:06 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id v14-20020a05600c470e00b00417e8be070csm2112941wmo.9.2024.05.02.07.29.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 07:29:06 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Akihiko Odaki Subject: [PATCH] ui/cocoa.m: Drop old macOS-10.12-and-earlier compat ifdefs Date: Thu, 2 May 2024 15:29:04 +0100 Message-Id: <20240502142904.62644-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=peter.maydell@linaro.org; helo=mail-lj1-x22a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We only support the most recent two versions of macOS (currently macOS 13 Ventura and macOS 14 Sonoma), and our ui/cocoa.m code already assumes at least macOS 12 Monterey or better, because it uses NSScreen safeAreaInsets, which is 12.0-or-newer. Remove the ifdefs that were providing backwards compatibility for building on 10.12 and earlier versions. Signed-off-by: Peter Maydell Reviewed-by: Daniel P. Berrangé --- ui/cocoa.m | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 25e0db9dd0b..981615a8b92 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -50,23 +50,10 @@ #include #include "hw/core/cpu.h" -#ifndef MAC_OS_X_VERSION_10_13 -#define MAC_OS_X_VERSION_10_13 101300 -#endif - #ifndef MAC_OS_VERSION_14_0 #define MAC_OS_VERSION_14_0 140000 #endif -/* 10.14 deprecates NSOnState and NSOffState in favor of - * NSControlStateValueOn/Off, which were introduced in 10.13. - * Define for older versions - */ -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13 -#define NSControlStateValueOn NSOnState -#define NSControlStateValueOff NSOffState -#endif - //#define DEBUG #ifdef DEBUG