[gtk+/wip/baedert/drawing: 117/183] inspector: Show the GdkWindow before grabbing
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 117/183] inspector: Show the GdkWindow before grabbing
- Date: Sat, 20 May 2017 13:26:19 +0000 (UTC)
commit 8e3846663de6c8196b9f9fdbc1f02cc09352e03b
Author: Timm Bäder <mail baedert org>
Date: Sat May 6 16:44:57 2017 +0200
inspector: Show the GdkWindow before grabbing
Gets rid of a critical when trying to inspect widgets.
gtk/inspector/inspect-button.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/gtk/inspector/inspect-button.c b/gtk/inspector/inspect-button.c
index e481ec4..728312c 100644
--- a/gtk/inspector/inspect-button.c
+++ b/gtk/inspector/inspect-button.c
@@ -352,6 +352,15 @@ property_query_event (GtkWidget *widget,
return TRUE;
}
+static void
+prepare_inspect_func (GdkSeat *seat,
+ GdkWindow *window,
+ gpointer user_data)
+{
+ gdk_window_show (window);
+}
+
+
void
gtk_inspector_on_inspect (GtkWidget *button,
GtkInspectorWindow *iw)
@@ -378,7 +387,7 @@ gtk_inspector_on_inspect (GtkWidget *button,
status = gdk_seat_grab (gdk_display_get_default_seat (display),
gtk_widget_get_window (iw->invisible),
GDK_SEAT_CAPABILITY_ALL_POINTING, TRUE,
- cursor, NULL, NULL, NULL);
+ cursor, NULL, prepare_inspect_func, NULL);
g_object_unref (cursor);
iw->grabbed = status == GDK_GRAB_SUCCESS;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]