Commit 3266b4dd authored by Matthias Clasen's avatar Matthias Clasen

inspector: Make picking more robust

Apparently ClutterOffscreen returns NULL as a window.
While that is not cool, we shouldn't crash.
parent 02a44c45
......@@ -62,11 +62,16 @@ find_widget (GtkWidget *widget,
if (gtk_widget_get_parent (widget) && !data->first)
GdkWindow *window = gtk_widget_get_window (widget);
GdkWindow *window;
window = gtk_widget_get_window (widget);
while (window != gtk_widget_get_window (gtk_widget_get_parent (widget)))
gint tx, ty, twidth, theight;
if (window == NULL)
twidth = gdk_window_get_width (window);
theight = gdk_window_get_height (window);
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