Commit 942395f7 authored by Michael Catanzaro's avatar Michael Catanzaro

Don't crash in window_get_workspace under Wayland

parent a9922973
......@@ -1122,6 +1122,8 @@ out:
g_free (cmd);
/* Most of the workspace manipulation code has been copied from libwnck
* Copyright (C) 2001 Havoc Pennington
* Copyright (C) 2005-2007 Vincent Untz
......@@ -1213,18 +1215,24 @@ window_get_workspace (Screen *xscreen,
return number;
/* Ask X to move to the desktop on which @window currently is
* and the present @window. */
empathy_move_to_window_desktop (GtkWindow *window,
guint32 timestamp)
GdkScreen *screen;
Screen *xscreen;
GdkWindow *gdk_window;
int workspace;
screen = gtk_window_get_screen (window);
if (!GDK_IS_X11_SCREEN (screen))
goto out;
xscreen = gdk_x11_screen_get_xscreen (screen);
gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
......@@ -1237,6 +1245,7 @@ empathy_move_to_window_desktop (GtkWindow *window,
gtk_window_present_with_time (window, timestamp);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment