From 44d961a2fd226cd6f2356b61a4007e512a25a581 Mon Sep 17 00:00:00 2001 From: Michael Fulbright Date: Fri, 19 Mar 1999 05:34:00 +0000 Subject: [PATCH] Fix from owen so that the preview process will die properly on 2.2 kernels when you exit the theme-selector-capplet Dr Mike --- capplets/theme-switcher/demo.c | 5 +++-- capplets/theme-switcher/demo.c-45827 | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/capplets/theme-switcher/demo.c b/capplets/theme-switcher/demo.c index 7f096c825..8408295d4 100644 --- a/capplets/theme-switcher/demo.c +++ b/capplets/theme-switcher/demo.c @@ -27,7 +27,8 @@ demo_data_in(gpointer data, gint source, GdkInputCondition condition) { gchar buf[256]; - if (read(source, buf, 2) == 0) + if (condition & GDK_INPUT_EXCEPTION || + read(source, buf, 2) == 0) gtk_main_quit(); /* Parent exited */ else { if (gtk_rc_reparse_all ()) @@ -155,7 +156,7 @@ demo_main(int argc, char **argv, gint in_fd) gtk_container_add (GTK_CONTAINER (scrolled_window), widget); - gdk_input_add_full(in_fd, GDK_INPUT_READ, demo_data_in, NULL, NULL); + gdk_input_add_full(in_fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, demo_data_in, NULL, NULL); gtk_widget_show_all (plug); gtk_main (); diff --git a/capplets/theme-switcher/demo.c-45827 b/capplets/theme-switcher/demo.c-45827 index 7f096c825..8408295d4 100644 --- a/capplets/theme-switcher/demo.c-45827 +++ b/capplets/theme-switcher/demo.c-45827 @@ -27,7 +27,8 @@ demo_data_in(gpointer data, gint source, GdkInputCondition condition) { gchar buf[256]; - if (read(source, buf, 2) == 0) + if (condition & GDK_INPUT_EXCEPTION || + read(source, buf, 2) == 0) gtk_main_quit(); /* Parent exited */ else { if (gtk_rc_reparse_all ()) @@ -155,7 +156,7 @@ demo_main(int argc, char **argv, gint in_fd) gtk_container_add (GTK_CONTAINER (scrolled_window), widget); - gdk_input_add_full(in_fd, GDK_INPUT_READ, demo_data_in, NULL, NULL); + gdk_input_add_full(in_fd, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, demo_data_in, NULL, NULL); gtk_widget_show_all (plug); gtk_main ();