[Xfce4-commits] <xfce4-weather-plugin:master> Summary window: Use gtk_widget_get_screen instead of gdk_window_get_screen.

Harald Judt noreply at xfce.org
Fri Jan 17 13:12:01 CET 2014


Updating branch refs/heads/master
         to 52581c4dae8671206c0ed065135d2117100c29b1 (commit)
       from 3f570c0ef4fcb335db13ec1e04f18936ab8122f2 (commit)

commit 52581c4dae8671206c0ed065135d2117100c29b1
Author: Harald Judt <h.judt at gmx.at>
Date:   Fri Jan 17 12:47:21 2014 +0100

    Summary window: Use gtk_widget_get_screen instead of gdk_window_get_screen.
    
    At the moment, we only require GDK-2.20, but gdk_widget_get_screen was
    introduced in GDK-2.24. Fix this by using the GTK equivalent available
    since GTK-2.2, it works fine too.

 panel-plugin/weather-summary.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c
index d8ab386..9236fad 100644
--- a/panel-plugin/weather-summary.c
+++ b/panel-plugin/weather-summary.c
@@ -987,7 +987,7 @@ create_forecast_tab(plugin_data *data)
      * maximum height we may use, subtracting some sane value just to
      * be on the safe side. */
     window = GDK_WINDOW(gtk_widget_get_window(GTK_WIDGET(data->iconimage)));
-    screen = GDK_SCREEN(gdk_window_get_screen(window));
+    screen = GDK_SCREEN(gtk_widget_get_screen(GTK_WIDGET(data->iconimage)));
     if (G_LIKELY(window && screen))
         monitor_num = gdk_screen_get_monitor_at_window(screen, window);
     gdk_screen_get_monitor_geometry(screen, monitor_num, &rect);


More information about the Xfce4-commits mailing list