Commit b89dad66 authored by Christian Kellner's avatar Christian Kellner
Browse files

Only setup the 'stop-shortcut' when running on X11

When running on Wayland (i.e. non-X11) the attempt to setup the
stop-shortcut, using X11 specific functions, will lead to a crash.
Therefore this disables the setup of the shortcut on non-X11.

https://bugzilla.gnome.org/show_bug.cgi?id=775996
parent 2515ed27
......@@ -495,7 +495,8 @@ application_start(GbbApplication *application)
gbb_power_graphs_set_test_run(GBB_POWER_GRAPHS(application->test_graphs), application->run);
setup_stop_shortcut(application);
if (GDK_IS_X11_DISPLAY(gtk_widget_get_display(application->window)))
setup_stop_shortcut(application);
gbb_test_runner_set_run(application->runner, application->run);
gbb_test_runner_start(application->runner);
......@@ -866,7 +867,8 @@ on_runner_phase_changed(GbbTestRunner *runner,
application->test = NULL;
remove_stop_shortcut(application);
if (GDK_IS_X11_DISPLAY(gtk_widget_get_display(application->window)))
remove_stop_shortcut(application);
g_object_set(G_OBJECT(application->start_button), "label", "Start", NULL);
......
Supports Markdown
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