|
|
commit 8ae8370dcfd88bb1b773d01eedd3d00fa5bda2fd
Author: Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Fri Jul 22 17:54:04 2022 +0200
Commit: Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Fri Jul 22 18:03:23 2022 +0200
X11: Suppress compiler warnings when using gcc or clang
Suppress warning [-Wdeprecated-declarations] regarding function
XKeycodeToKeysym()
Backported from master branch.
Update 'CHANGES' for a potential release 1.3.9
CHANGES | 21 +++++++++++++++++++++
src/Fl_x.cxx | 34 ++++++++++++++++++++++++++++++----
2 files changed, 51 insertions(+), 4 deletions(-)
diff --git CHANGES CHANGES
index 7601b8d..5068c15 100644
--- CHANGES
+++ CHANGES
@@ -1,3 +1,24 @@
+CHANGES IN FLTK 1.3.9 RELEASED: ???
+
+FLTK 1.3.9 is a maintenance release with some fixes and enhancements.
+
+Details:
+
+ Albrecht Schlosser:
+ Backport X11 INCR protocol fixes from 1.4.0 (issue #451)
+ X11: Suppress compiler warnings when using gcc or clang
+
+ ManoloFLTK:
+ macOS platform: fix for issue #325 Disabling IM disables Greek and Cyrillic layouts
+ Fix fullscreen window level corner cases on macOS - cont'd
+ Fix for issue #373 apparent with macOS platform and SDK â?¤ 10.13
+ Fi xfor issue #452: Fl::get_font_name failure on OS-X.
+ Fix for issue #454 : crash in Fl::get_font_name().
+
+ YX:
+ Fix IME problem (issue #270)
+
+
CHANGES IN FLTK 1.3.8 RELEASED: Nov 20 2021
FLTK 1.3.8 is a maintenance release with some fixes and enhancements.
diff --git src/Fl_x.cxx src/Fl_x.cxx
index 096bc7b..70712cb 100644
--- src/Fl_x.cxx
+++ src/Fl_x.cxx
@@ -1,7 +1,7 @@
//
// X specific code for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2021 by Bill Spitzak and others.
+// Copyright 1998-2022 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -1453,14 +1453,40 @@ static long getIncrData(uchar* &data, const XSelectionEvent& selevent, size_t lo
return (long)total;
}
-/* Internal function to reduce "deprecated" warnings for XKeycodeToKeysym().
- This way we get only one warning. The option to use XkbKeycodeToKeysym()
- instead would not help much - see STR #2913 for more information.
+/*
+ Internal function to reduce "deprecated" warnings for XKeycodeToKeysym().
+ This way we get at most one warning. The option to use XkbKeycodeToKeysym()
+ instead would not help much - see STR #2913 for more information.
+
+ Update (July 22, 2022): disable "deprecated declaration" warnings in
+ this function for GCC >= 4.6 and clang (all versions) to get rid of
+ these warnings at least for current GCC and clang compilers.
+
+ Note: '#pragma GCC diagnostic push' needs at least GCC 4.6.
*/
+
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5))
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
static KeySym fl_KeycodeToKeysym(Display *d, KeyCode k, unsigned i) {
return XKeycodeToKeysym(d, k, i);
}
+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5))
+#pragma GCC diagnostic pop
+#endif
+
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
int fl_handle(const XEvent& thisevent)
{
XEvent xevent = thisevent;
[ Direct Link to Message ] | |
|
| |