diff options
author | William Wold <[email protected]> | 2019-06-17 22:31:50 +0000 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-06-23 10:12:24 +0200 |
commit | b54ee03c1b393348ee3b6af6ab3cb6b4676e87a4 (patch) | |
tree | 1736d4bcba7c47da753eef0dc19c9bbee9abd364 | |
parent | b852dfa8c677f1a95cee98d1350d99c6bb28f50c (diff) | |
download | mate-panel-b54ee03c1b393348ee3b6af6ab3cb6b4676e87a4.tar.bz2 mate-panel-b54ee03c1b393348ee3b6af6ab3cb6b4676e87a4.tar.xz |
In mate-panel-applet-factory.c, only set screen when used
-rw-r--r-- | libmate-panel-applet/mate-panel-applet-factory.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libmate-panel-applet/mate-panel-applet-factory.c b/libmate-panel-applet/mate-panel-applet-factory.c index 2c6c1840..6d51cae3 100644 --- a/libmate-panel-applet/mate-panel-applet-factory.c +++ b/libmate-panel-applet/mate-panel-applet-factory.c @@ -198,7 +198,6 @@ mate_panel_applet_factory_get_applet (MatePanelAppletFactory *factory, gint screen_num; GVariant *props; GVariant *return_value; - GdkScreen *screen; guint32 xid; guint32 uid; const gchar *object_path; @@ -217,12 +216,13 @@ mate_panel_applet_factory_get_applet (MatePanelAppletFactory *factory, set_applet_constructor_properties (applet, props); g_variant_unref (props); - screen = screen_num != -1 ? - gdk_display_get_default_screen (gdk_display_get_default ()) : - gdk_screen_get_default (); - #ifdef HAVE_X11 - if (GDK_IS_X11_DISPLAY (gdk_screen_get_display (screen))) { + if (GDK_IS_X11_DISPLAY (gdk_display_get_default ())) { + GdkScreen *screen; + + screen = screen_num != -1 ? + gdk_display_get_default_screen (gdk_display_get_default ()) : + gdk_screen_get_default (); xid = mate_panel_applet_get_xid (MATE_PANEL_APPLET (applet), screen); } else #endif |