All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ui/cocoa.m: Drop old macOS-10.12-and-earlier compat ifdefs
@ 2024-05-02 14:29 Peter Maydell
  2024-05-02 14:30 ` Daniel P. Berrangé
  2024-05-03 12:56 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Maydell @ 2024-05-02 14:29 UTC (permalink / raw
  To: qemu-devel; +Cc: qemu-trivial, Philippe Mathieu-Daudé, Akihiko Odaki

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 <peter.maydell@linaro.org>
---
 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 <Carbon/Carbon.h>
 #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
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ui/cocoa.m: Drop old macOS-10.12-and-earlier compat ifdefs
  2024-05-02 14:29 [PATCH] ui/cocoa.m: Drop old macOS-10.12-and-earlier compat ifdefs Peter Maydell
@ 2024-05-02 14:30 ` Daniel P. Berrangé
  2024-05-03 12:56 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel P. Berrangé @ 2024-05-02 14:30 UTC (permalink / raw
  To: Peter Maydell
  Cc: qemu-devel, qemu-trivial, Philippe Mathieu-Daudé,
	Akihiko Odaki

On Thu, May 02, 2024 at 03:29:04PM +0100, Peter Maydell wrote:
> 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 <peter.maydell@linaro.org>
> ---
>  ui/cocoa.m | 13 -------------
>  1 file changed, 13 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ui/cocoa.m: Drop old macOS-10.12-and-earlier compat ifdefs
  2024-05-02 14:29 [PATCH] ui/cocoa.m: Drop old macOS-10.12-and-earlier compat ifdefs Peter Maydell
  2024-05-02 14:30 ` Daniel P. Berrangé
@ 2024-05-03 12:56 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-05-03 12:56 UTC (permalink / raw
  To: Peter Maydell, qemu-devel; +Cc: qemu-trivial, Akihiko Odaki

On 2/5/24 16:29, Peter Maydell wrote:
> 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 <peter.maydell@linaro.org>
> ---
>   ui/cocoa.m | 13 -------------
>   1 file changed, 13 deletions(-)

Thanks, patch queued.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-03 12:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-02 14:29 [PATCH] ui/cocoa.m: Drop old macOS-10.12-and-earlier compat ifdefs Peter Maydell
2024-05-02 14:30 ` Daniel P. Berrangé
2024-05-03 12:56 ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.