avoid gtk_widget_get_root_window(), deprecated in GTK+ 3.12

This commit is contained in:
Paul Cornett 2015-10-10 11:50:27 -07:00
parent 48459e3cd2
commit a15e776dcd

View File

@ -826,7 +826,8 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long)
m_fsIsShowing = show;
#ifdef GDK_WINDOWING_X11
GdkDisplay *display = gtk_widget_get_display(m_widget);
GdkScreen* screen = gtk_widget_get_screen(m_widget);
GdkDisplay* display = gdk_screen_get_display(screen);
Display* xdpy = NULL;
Window xroot = None;
wxX11FullScreenMethod method = wxX11_FS_WMSPEC;
@ -834,7 +835,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long)
if (GDK_IS_X11_DISPLAY(display))
{
xdpy = GDK_DISPLAY_XDISPLAY(display);
xroot = GDK_WINDOW_XID(gtk_widget_get_root_window(m_widget));
xroot = GDK_WINDOW_XID(gdk_screen_get_root_window(screen));
method = wxGetFullScreenMethodX11(xdpy, (WXWindow)xroot);
}
@ -861,7 +862,6 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long)
GetPosition( &m_fsSaveFrame.x, &m_fsSaveFrame.y );
GetSize( &m_fsSaveFrame.width, &m_fsSaveFrame.height );
GdkScreen* screen = gtk_widget_get_screen(m_widget);
const int screen_width = gdk_screen_get_width(screen);
const int screen_height = gdk_screen_get_height(screen);