[recipes] Make exporting work with recent GTK+
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Make exporting work with recent GTK+
- Date: Wed, 17 May 2017 02:35:11 +0000 (UTC)
commit 75862524de919637ff1166de5e337ee4ad4a7774
Author: Matthias Clasen <mclasen redhat com>
Date: Tue May 16 22:33:58 2017 -0400
Make exporting work with recent GTK+
The wayland handle export function in GTK+ got a little
stricter about freeing its user data, recently. This
was causing us to crash. Fix that by not adding an extra
idle here.
src/gr-utils.c | 20 +++-----------------
1 files changed, 3 insertions(+), 17 deletions(-)
---
diff --git a/src/gr-utils.c b/src/gr-utils.c
index 93f4d68..79c149a 100644
--- a/src/gr-utils.c
+++ b/src/gr-utils.c
@@ -457,17 +457,6 @@ free_exported_data (gpointer data)
g_free (d);
}
-static gboolean
-handle_exported_idle (gpointer user_data)
-{
- WaylandWindowHandleExportedData *data = user_data;
-
- data->callback (data->window, data->handle_str, data->user_data);
- free_exported_data (data);
-
- return G_SOURCE_REMOVE;
-}
-
static void
wayland_window_handle_exported (GdkWindow *window,
const char *wayland_handle_str,
@@ -476,7 +465,7 @@ wayland_window_handle_exported (GdkWindow *window,
WaylandWindowHandleExportedData *data = user_data;
data->handle_str = g_strdup_printf ("wayland:%s", wayland_handle_str);
- g_idle_add (handle_exported_idle, data);
+ data->callback (data->window, data->handle_str, data->user_data);
}
#endif
@@ -510,13 +499,10 @@ window_export_handle (GtkWindow *window,
if (!gdk_wayland_window_export_handle (gdk_window,
wayland_window_handle_exported,
data,
- free_exported_data)) {
- free_exported_data (data);
+ free_exported_data))
return FALSE;
- }
- else {
+ else
return TRUE;
- }
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]