From cc35003aa44bd73b1fa42b7b34d481bec71b5bfe Mon Sep 17 00:00:00 2001 From: Mart Raudsepp Date: Tue, 14 Jun 2005 13:00:42 +0000 Subject: [PATCH] Add some missing runtime gtk+ version checks. There is more to spot. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/dcclient.cpp | 2 +- src/gtk/toplevel.cpp | 2 +- src/gtk/window.cpp | 1 + src/gtk1/dcclient.cpp | 2 +- src/gtk1/toplevel.cpp | 2 +- src/gtk1/window.cpp | 1 + 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 339aab1a31..3f69545b3c 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -1154,7 +1154,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap, else { #if GTK_CHECK_VERSION(2,2,0) - if (use_bitmap.HasPixbuf()) + if (!gtk_check_version(2,2,0) && use_bitmap.HasPixbuf()) { gdk_draw_pixbuf(m_window, m_penGC, use_bitmap.GetPixbuf(), diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index c8705377dc..00d8ba7631 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -683,7 +683,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style ) // to switch to fullscreen, which is not always available. We must // check if WM supports the spec and use legacy methods if it // doesn't. - if (method == wxX11_FS_WMSPEC) + if ( (method == wxX11_FS_WMSPEC) && !gtk_check_version(2,2,0) ) { if (show) gtk_window_fullscreen( GTK_WINDOW( m_widget ) ); diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 950f84f25a..345274e55d 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1704,6 +1704,7 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, // GdkDisplay is a GTK+ 2.2.0 thing #if defined(__WXGTK20__) && GTK_CHECK_VERSION(2, 2, 0) if ( gdk_event->type == GDK_2BUTTON_PRESS && + !gtk_check_version(2,2,0) && gdk_event->button >= 1 && gdk_event->button <= 3 ) { // Reset GDK internal timestamp variables in order to disable GDK diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 339aab1a31..3f69545b3c 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -1154,7 +1154,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap, else { #if GTK_CHECK_VERSION(2,2,0) - if (use_bitmap.HasPixbuf()) + if (!gtk_check_version(2,2,0) && use_bitmap.HasPixbuf()) { gdk_draw_pixbuf(m_window, m_penGC, use_bitmap.GetPixbuf(), diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index c8705377dc..00d8ba7631 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -683,7 +683,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style ) // to switch to fullscreen, which is not always available. We must // check if WM supports the spec and use legacy methods if it // doesn't. - if (method == wxX11_FS_WMSPEC) + if ( (method == wxX11_FS_WMSPEC) && !gtk_check_version(2,2,0) ) { if (show) gtk_window_fullscreen( GTK_WINDOW( m_widget ) ); diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 950f84f25a..345274e55d 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -1704,6 +1704,7 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, // GdkDisplay is a GTK+ 2.2.0 thing #if defined(__WXGTK20__) && GTK_CHECK_VERSION(2, 2, 0) if ( gdk_event->type == GDK_2BUTTON_PRESS && + !gtk_check_version(2,2,0) && gdk_event->button >= 1 && gdk_event->button <= 3 ) { // Reset GDK internal timestamp variables in order to disable GDK -- 2.45.2