forked from AuroraMiddleware/gtk
gtkmain: short-circuit gtk_main_sync() where no display
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.
This commit is contained in:
parent
f0cbd175cd
commit
4a7f68e79e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user