qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Tobias Markus <tobbi.bugs@gmail.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, philmd@linaro.org,
	akihiko.odaki@daynix.com, kraxel@redhat.com,
	marcandre.lureau@redhat.com
Subject: [PATCH 1/1] Fix safeAreaInsets not being available on OS X 10.13
Date: Sun, 28 Apr 2024 13:57:29 +0200	[thread overview]
Message-ID: <fa98f79e-f682-4efc-9cfd-37a108b853b5@googlemail.com> (raw)

Hello,

to prefix this: I previously filed 
https://gitlab.com/qemu-project/qemu/-/issues/2314 for this compilation 
error and I'm quite aware that QEMU only supports the most recent two 
versions of Mac OS X by default. However, given the small change 
required for this to work, I hope you can make an exception and include 
the attached patch into QEMU.

It would really help me continue to run QEMU on my legacy MacOS X 10.13 
version.

Thanks in advance!

Kind regards,
Tobias Markus

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2314
Signed-off-by: Tobias Markus <tobbi.bugs@googlemail.com>
---
  ui/cocoa.m | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/ui/cocoa.m b/ui/cocoa.m
index 25e0db9dd0..96992736ef 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -539,9 +539,11 @@ - (NSSize)fixAspectRatio:(NSSize)max
  - (NSSize) screenSafeAreaSize
  {
      NSSize size = [[[self window] screen] frame].size;
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_14_0
      NSEdgeInsets insets = [[[self window] screen] safeAreaInsets];
      size.width -= insets.left + insets.right;
      size.height -= insets.top + insets.bottom;
+#endif
      return size;
  }

-- 
2.24.3 (Apple Git-128)



             reply	other threads:[~2024-04-28 14:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-28 11:57 Tobias Markus [this message]
2024-04-28 12:14 ` [PATCH 1/1] Fix safeAreaInsets not being available on OS X 10.13 Akihiko Odaki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa98f79e-f682-4efc-9cfd-37a108b853b5@googlemail.com \
    --to=tobbi.bugs@gmail.com \
    --cc=akihiko.odaki@daynix.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).