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
This commit is contained in:
@@ -1154,7 +1154,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if GTK_CHECK_VERSION(2,2,0)
|
#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,
|
gdk_draw_pixbuf(m_window, m_penGC,
|
||||||
use_bitmap.GetPixbuf(),
|
use_bitmap.GetPixbuf(),
|
||||||
|
@@ -683,7 +683,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
|
|||||||
// to switch to fullscreen, which is not always available. We must
|
// to switch to fullscreen, which is not always available. We must
|
||||||
// check if WM supports the spec and use legacy methods if it
|
// check if WM supports the spec and use legacy methods if it
|
||||||
// doesn't.
|
// doesn't.
|
||||||
if (method == wxX11_FS_WMSPEC)
|
if ( (method == wxX11_FS_WMSPEC) && !gtk_check_version(2,2,0) )
|
||||||
{
|
{
|
||||||
if (show)
|
if (show)
|
||||||
gtk_window_fullscreen( GTK_WINDOW( m_widget ) );
|
gtk_window_fullscreen( GTK_WINDOW( m_widget ) );
|
||||||
|
@@ -1704,6 +1704,7 @@ static gint gtk_window_button_press_callback( GtkWidget *widget,
|
|||||||
// GdkDisplay is a GTK+ 2.2.0 thing
|
// GdkDisplay is a GTK+ 2.2.0 thing
|
||||||
#if defined(__WXGTK20__) && GTK_CHECK_VERSION(2, 2, 0)
|
#if defined(__WXGTK20__) && GTK_CHECK_VERSION(2, 2, 0)
|
||||||
if ( gdk_event->type == GDK_2BUTTON_PRESS &&
|
if ( gdk_event->type == GDK_2BUTTON_PRESS &&
|
||||||
|
!gtk_check_version(2,2,0) &&
|
||||||
gdk_event->button >= 1 && gdk_event->button <= 3 )
|
gdk_event->button >= 1 && gdk_event->button <= 3 )
|
||||||
{
|
{
|
||||||
// Reset GDK internal timestamp variables in order to disable GDK
|
// Reset GDK internal timestamp variables in order to disable GDK
|
||||||
|
@@ -1154,7 +1154,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if GTK_CHECK_VERSION(2,2,0)
|
#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,
|
gdk_draw_pixbuf(m_window, m_penGC,
|
||||||
use_bitmap.GetPixbuf(),
|
use_bitmap.GetPixbuf(),
|
||||||
|
@@ -683,7 +683,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
|
|||||||
// to switch to fullscreen, which is not always available. We must
|
// to switch to fullscreen, which is not always available. We must
|
||||||
// check if WM supports the spec and use legacy methods if it
|
// check if WM supports the spec and use legacy methods if it
|
||||||
// doesn't.
|
// doesn't.
|
||||||
if (method == wxX11_FS_WMSPEC)
|
if ( (method == wxX11_FS_WMSPEC) && !gtk_check_version(2,2,0) )
|
||||||
{
|
{
|
||||||
if (show)
|
if (show)
|
||||||
gtk_window_fullscreen( GTK_WINDOW( m_widget ) );
|
gtk_window_fullscreen( GTK_WINDOW( m_widget ) );
|
||||||
|
@@ -1704,6 +1704,7 @@ static gint gtk_window_button_press_callback( GtkWidget *widget,
|
|||||||
// GdkDisplay is a GTK+ 2.2.0 thing
|
// GdkDisplay is a GTK+ 2.2.0 thing
|
||||||
#if defined(__WXGTK20__) && GTK_CHECK_VERSION(2, 2, 0)
|
#if defined(__WXGTK20__) && GTK_CHECK_VERSION(2, 2, 0)
|
||||||
if ( gdk_event->type == GDK_2BUTTON_PRESS &&
|
if ( gdk_event->type == GDK_2BUTTON_PRESS &&
|
||||||
|
!gtk_check_version(2,2,0) &&
|
||||||
gdk_event->button >= 1 && gdk_event->button <= 3 )
|
gdk_event->button >= 1 && gdk_event->button <= 3 )
|
||||||
{
|
{
|
||||||
// Reset GDK internal timestamp variables in order to disable GDK
|
// Reset GDK internal timestamp variables in order to disable GDK
|
||||||
|
Reference in New Issue
Block a user