projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0cbd17
)
gtkmain: short-circuit gtk_main_sync() where no display
author
Christian Hergert
<chergert@redhat.com>
Fri, 10 Jan 2020 23:00:10 +0000
(15:00 -0800)
committer
Christian Hergert
<chergert@redhat.com>
Fri, 10 Jan 2020 23:00:10 +0000
(15:00 -0800)
If there is no display, we will hit the slow path here which
can introduce long latencies in unit tests. This checks for
a NULL list of displays and simply short-circuits.
gtk/gtkmain.c
patch
|
blob
|
history
diff --git
a/gtk/gtkmain.c
b/gtk/gtkmain.c
index fe5868a95d7738522161a9bcb8844c0e8580c0b7..93fea8540ae4367f868fe4c8f5746661627c5d37 100644
(file)
--- a/
gtk/gtkmain.c
+++ b/
gtk/gtkmain.c
@@
-1081,6
+1081,9
@@
gtk_main_sync (void)
/* Try storing all clipboard data we have */
displays = gdk_display_manager_list_displays (gdk_display_manager_get ());
+ if (displays == NULL)
+ return;
+
cancel = g_cancellable_new ();
for (l = displays; l; l = l->next)