aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYavor Doganov2026-01-01 18:26:38 +0200
committerEli Zaretskii2026-01-10 14:30:43 +0200
commit98f56a156e9bc1b74a6238abbfac6a4a9022a874 (patch)
treed7134da2027f536bd69d73c42fa3da7b35033bef
parentee65464ca1f8fe62c9fa43a0d7c393c649423c62 (diff)
downloademacs-98f56a156e9bc1b74a6238abbfac6a4a9022a874.tar.gz
emacs-98f56a156e9bc1b74a6238abbfac6a4a9022a874.zip
NS: Use Cocoa implementation of EmacsBell -init if named image is declared
* configure.ac: Check for 'NSImageNameCaution' declaration when building on GNUstep. * src/nsterm.m ([EmacsBell init]): Use fallback implementation on GNUstep only if 'NSImageNameCaution' is not declared. (Bug#80107)
-rw-r--r--configure.ac5
-rw-r--r--src/nsterm.m2
2 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 9907ab86e83..5be2588600d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2886,6 +2886,11 @@ Mac OS X 12.x or later.
2886 [Define to use native OS APIs for images.]) 2886 [Define to use native OS APIs for images.])
2887 NATIVE_IMAGE_API="yes (ns)" 2887 NATIVE_IMAGE_API="yes (ns)"
2888 fi 2888 fi
2889
2890 if test "${NS_IMPL_GNUSTEP}" = yes; then
2891 AC_CHECK_DECLS([NSImageNameCaution], [], [],
2892 [[#import <AppKit/NSImage.h>]])
2893 fi
2889fi 2894fi
2890 2895
2891AC_SUBST([LIBS_GNUSTEP]) 2896AC_SUBST([LIBS_GNUSTEP])
diff --git a/src/nsterm.m b/src/nsterm.m
index fe5bc35086d..f96096242d2 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1221,7 +1221,7 @@ ns_unfocus (struct frame *f)
1221 { 1221 {
1222 nestCount = 0; 1222 nestCount = 0;
1223 isAttached = false; 1223 isAttached = false;
1224#ifdef NS_IMPL_GNUSTEP 1224#if NS_IMPL_GNUSTEP && !HAVE_DECL_NSIMAGENAMECAUTION
1225 // GNUstep doesn't provide named images. This was reported in 1225 // GNUstep doesn't provide named images. This was reported in
1226 // 2011, see https://savannah.gnu.org/bugs/?33396 1226 // 2011, see https://savannah.gnu.org/bugs/?33396
1227 // 1227 //