diff options
author | lukefromdc <[email protected]> | 2024-11-22 01:06:52 -0500 |
---|---|---|
committer | Luke from DC <[email protected]> | 2024-11-27 03:49:44 +0000 |
commit | b6c248aad24637a75e50d56280860d3a8a308dc1 (patch) | |
tree | 8a6fc48d5922b33e036caa59b7302e7bfd509377 /stickynotes/util.c | |
parent | c0cb20ed7a38d2a1461ee16f5ec0979c32ca6273 (diff) | |
download | mate-applets-b6c248aad24637a75e50d56280860d3a8a308dc1.tar.bz2 mate-applets-b6c248aad24637a75e50d56280860d3a8a308dc1.tar.xz |
Do not call x11 functions when not in x11
*Otherwise we get segfaults
Diffstat (limited to 'stickynotes/util.c')
-rw-r--r-- | stickynotes/util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/stickynotes/util.c b/stickynotes/util.c index d13f9f41..9b6a5180 100644 --- a/stickynotes/util.c +++ b/stickynotes/util.c @@ -110,6 +110,9 @@ xstuff_change_workspace (GtkWindow *window, Display *gdk_display; Screen *screen; + if (!GDK_IS_X11_DISPLAY (gdk_display_get_default())) + return; + gdk_display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); xwindow = GDK_WINDOW_XID (GDK_WINDOW (gtk_widget_get_window (GTK_WIDGET (window)))); screen = GDK_SCREEN_XSCREEN (gtk_widget_get_screen (GTK_WIDGET (window))); |