Suppress deprecation warnings for resize grip

We need the code for older GTK3 versions
This commit is contained in:
Paul Cornett 2016-02-10 09:35:15 -08:00
parent 08ad90937b
commit 2bb8367cba
2 changed files with 8 additions and 0 deletions

View File

@ -409,8 +409,10 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) )
#ifdef __WXGTK3__
GtkWidget* toplevel = gtk_widget_get_toplevel(m_widget);
GdkRectangle rect;
wxGCC_WARNING_SUPPRESS(deprecated-declarations)
if (toplevel && (!gtk_window_get_resize_grip_area(GTK_WINDOW(toplevel), &rect) ||
rect.width == 0 || rect.height == 0))
wxGCC_WARNING_RESTORE()
{
GtkStyleContext* sc = gtk_widget_get_style_context(toplevel);
gtk_style_context_save(sc);
@ -468,8 +470,10 @@ void wxStatusBarGeneric::OnLeftDown(wxMouseEvent& event)
GtkWidget* ancestor = gtk_widget_get_toplevel(m_widget);
#ifdef __WXGTK3__
GdkRectangle rect;
wxGCC_WARNING_SUPPRESS(deprecated-declarations)
if (ancestor && gtk_window_get_resize_grip_area(GTK_WINDOW(ancestor), &rect) &&
rect.width && rect.height)
wxGCC_WARNING_RESTORE()
{
ancestor = NULL;
}
@ -516,8 +520,10 @@ void wxStatusBarGeneric::OnRightDown(wxMouseEvent& event)
GtkWidget* ancestor = gtk_widget_get_toplevel(m_widget);
#ifdef __WXGTK3__
GdkRectangle rect;
wxGCC_WARNING_SUPPRESS(deprecated-declarations)
if (ancestor && gtk_window_get_resize_grip_area(GTK_WINDOW(ancestor), &rect) &&
rect.width && rect.height)
wxGCC_WARNING_RESTORE()
{
ancestor = NULL;
}

View File

@ -371,6 +371,7 @@ void wxTopLevelWindowGTK::GTKHandleRealized()
gdk_window_set_cursor(window, cursor);
#ifdef __WXGTK3__
wxGCC_WARNING_SUPPRESS(deprecated-declarations)
if (gtk_window_get_has_resize_grip(GTK_WINDOW(m_widget)))
{
// Grip window can end up obscured, probably due to deferred show.
@ -378,6 +379,7 @@ void wxTopLevelWindowGTK::GTKHandleRealized()
gtk_window_set_has_resize_grip(GTK_WINDOW(m_widget), false);
gtk_window_set_has_resize_grip(GTK_WINDOW(m_widget), true);
}
wxGCC_WARNING_RESTORE()
#endif
}