Репозитории ALT
S: | 1.1.14-alt9 |
5.1: | 1.1.14-alt8 |
4.1: | 1.1.14-alt6 |
4.0: | 1.1.14-alt5 |
3.0: | 1.1.14-alt1 |
Другие репозитории
Upstream: | 1.1.14 |
Группа :: Игры/Аркады
Пакет: crack-attack
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: crack-attack-alt-upstream-alt_f4_exit_fix.patch
Скачать
Скачать
Correctly exit from game when Alt+F4 pressed or 'x' button clicked.
See for details:
https://savannah.nongnu.org/bugs/?13163
https://savannah.nongnu.org/bugs/?17839
http://www.openbsd.org/cgi-bin/cvsweb/ports/games/crack-attack/patches/patch-src_gtk-gui_gui_main_cxx
--- crack-attack-1.1.14/src/gtk-gui/gui_main.cxx 2005-05-01 10:04:12 +0700
+++ crack-attack-1.1.15-cvs-01/src/gtk-gui/gui_main.cxx 2006-06-02 10:38:40 +0700
@@ -50,6 +50,18 @@
int glut_argc;
char **glut_argv;
+/*
+ * Call this when the window is unexpectedly destroyed to make sure the
+ * hidden gui process doesn't hang around in the background.
+ */
+static void destroy_window(GtkObject *object, gpointer data) {
+#ifdef DEVELOPMENT
+ g_print("\nOh no! We've been unexpectedly destroyed! :(\n");
+#endif
+ gtk_main_quit();
+}
+
+
/*
* Documentation
* html tables don't work right in explorer
@@ -76,6 +88,8 @@
winCrackAttackSplash = create_winCrackAttackSplash ();
gui_data_read(winCrackAttackSplash);
gtk_widget_show (winCrackAttackSplash);
+ g_signal_connect(GTK_OBJECT(winCrackAttackSplash), "destroy",
+ G_CALLBACK(destroy_window), NULL);
gtk_main ();
return 0;