forked from AuroraMiddleware/gtk
displayclose: Quietly skip if no X available
This commit is contained in:
parent
31cf894092
commit
0232218100
@ -19,7 +19,7 @@ main (int argc, char **argv)
|
||||
display = gdk_display_open (display_name);
|
||||
|
||||
if (!display)
|
||||
return 1;
|
||||
return 0;
|
||||
|
||||
gdk_display_manager_set_default_display (gdk_display_manager_get (), display);
|
||||
|
||||
@ -27,7 +27,7 @@ main (int argc, char **argv)
|
||||
|
||||
but = gtk_button_new_with_label ("Try to Exit");
|
||||
g_signal_connect_swapped (but, "clicked",
|
||||
G_CALLBACK (gtk_window_destroy), win);
|
||||
G_CALLBACK (gtk_window_destroy), win);
|
||||
gtk_window_set_child (GTK_WINDOW (win), but);
|
||||
|
||||
gtk_widget_show (win);
|
||||
|
Loading…
Reference in New Issue
Block a user