Merge branch 'cmake-gtk2' of github.com:MaartenBent/wxWidgets

Fix some CMake and build warnings with GTK2.

See #22305.
This commit is contained in:
Vadim Zeitlin
2022-04-14 23:19:54 +02:00
5 changed files with 11 additions and 4 deletions

View File

@@ -510,7 +510,7 @@ if(wxUSE_GUI)
if(NOT LIBNOTIFY_FOUND)
message(WARNING "Libnotify not found, it won't be used for notifications")
wx_option_force_value(wxUSE_LIBNOTIFY OFF)
elseif((LIBNOTIFY_VERSION GREATER 0.7) OR (LIBNOTIFY_VERSION EQUAL 0.7))
elseif(LIBNOTIFY_VERSION VERSION_GREATER_EQUAL 0.7)
set(wxUSE_LIBNOTIFY_0_7 ON)
endif()
else()

View File

@@ -78,7 +78,7 @@ else (GNOMEVFS2_LIBRARIES AND GNOMEVFS2_INCLUDE_DIRS)
message(STATUS "Found GnomeVFS2: ${GNOMEVFS2_LIBRARIES}")
endif (NOT GNOMEVFS2_FIND_QUIETLY)
else (GNOMEVFS2_FOUND)
if (GnomeVFS2_FIND_REQUIRED)
if (GNOMEVFS2_FIND_REQUIRED)
message(FATAL_ERROR "Could not find GnomeVFS2")
endif (GNOMEVFS2_FIND_REQUIRED)
endif (GNOMEVFS2_FOUND)

View File

@@ -57,8 +57,8 @@ endif()
if(WXGTK)
# Add GTK version definitions
foreach(gtk_version 1.2.7 2.0 2.10 2.18 2.20 3.0 3.90.0)
if(wxTOOLKIT_VERSION VERSION_GREATER gtk_version)
foreach(gtk_version 2.0 2.10 2.18 2.20 3.0 3.90.0)
if(wxTOOLKIT_VERSION VERSION_GREATER_EQUAL gtk_version)
if(gtk_version EQUAL 3.90.0)
set(__WXGTK4__ ON)
elseif(gtk_version EQUAL 3.0)

View File

@@ -296,6 +296,7 @@ egg_tray_icon_get_orientation_property (EggTrayIcon *icon)
static GdkFilterReturn
egg_tray_icon_manager_filter (GdkXEvent *xevent, GdkEvent *event, gpointer user_data)
{
(void)event;
EggTrayIcon *icon = user_data;
XEvent *xev = (XEvent *)xevent;
@@ -451,6 +452,7 @@ egg_tray_icon_manager_window_destroyed (EggTrayIcon *icon)
static gboolean
transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
{
(void)user_data;
gdk_window_clear_area (widget->window, event->area.x, event->area.y,
event->area.width, event->area.height);
return FALSE;
@@ -460,12 +462,15 @@ static void
make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
gpointer user_data)
{
(void)previous_style;
(void)user_data;
gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
}
static void
make_transparent (GtkWidget *widget, gpointer user_data)
{
(void)user_data;
if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget))
return;

View File

@@ -1065,7 +1065,9 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event,
#ifdef HAVE_X11_XKBLIB_H
KeySym keysymNormalized = XkbKeycodeToKeysym(dpy, keycode, 0, 0);
#else
wxGCC_WARNING_SUPPRESS(deprecated-declarations)
KeySym keysymNormalized = XKeycodeToKeysym(dpy, keycode, 0);
wxGCC_WARNING_RESTORE()
#endif
// use the normalized, i.e. lower register, keysym if we've