Mercurial > pidgin.yaz
comparison console/libgnt/gntmain.c @ 14737:87fe294744aa
[gaim-migrate @ 17493]
Patch from Richard Nelson (wabz). This will allow the WM to do stuff when a
window is closed.
Also, ignore SIGPIPE, although this doesn't seem to help.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 17 Oct 2006 04:34:55 +0000 |
parents | fa285d018c71 |
children | e1cfdb131c62 |
comparison
equal
deleted
inserted
replaced
14736:d1eb55b1b28d | 14737:87fe294744aa |
---|---|
266 /* This is the current window in focus */ | 266 /* This is the current window in focus */ |
267 color = GNT_COLOR_TITLE; | 267 color = GNT_COLOR_TITLE; |
268 GNT_WIDGET_UNSET_FLAGS(w, GNT_WIDGET_URGENT); | 268 GNT_WIDGET_UNSET_FLAGS(w, GNT_WIDGET_URGENT); |
269 if (wm.window_update) { | 269 if (wm.window_update) { |
270 GntNode *node = g_hash_table_lookup(nodes, w); | 270 GntNode *node = g_hash_table_lookup(nodes, w); |
271 wm.window_update(node->panel, w); | 271 if (node) |
272 wm.window_update(node->panel, w); | |
272 } | 273 } |
273 } else if (GNT_WIDGET_IS_FLAG_SET(w, GNT_WIDGET_URGENT)) { | 274 } else if (GNT_WIDGET_IS_FLAG_SET(w, GNT_WIDGET_URGENT)) { |
274 /* This is a window with the URGENT hint set */ | 275 /* This is a window with the URGENT hint set */ |
275 color = GNT_COLOR_URGENT; | 276 color = GNT_COLOR_URGENT; |
276 } else { | 277 } else { |
1156 | 1157 |
1157 #ifdef SIGWINCH | 1158 #ifdef SIGWINCH |
1158 signal(SIGWINCH, sighandler); | 1159 signal(SIGWINCH, sighandler); |
1159 #endif | 1160 #endif |
1160 signal(SIGCHLD, sighandler); | 1161 signal(SIGCHLD, sighandler); |
1162 signal(SIGPIPE, SIG_IGN); | |
1161 | 1163 |
1162 g_type_init(); | 1164 g_type_init(); |
1163 | 1165 |
1164 init_wm(); | 1166 init_wm(); |
1165 } | 1167 } |
1222 gnt_screen_remove_widget(widget); | 1224 gnt_screen_remove_widget(widget); |
1223 node = g_hash_table_lookup(nodes, widget); | 1225 node = g_hash_table_lookup(nodes, widget); |
1224 | 1226 |
1225 if (node == NULL) /* Yay! Nothing to do. */ | 1227 if (node == NULL) /* Yay! Nothing to do. */ |
1226 return; | 1228 return; |
1229 | |
1230 if (GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_DESTROYING) && wm.close_window) | |
1231 wm.close_window(widget); | |
1227 | 1232 |
1228 g_hash_table_remove(nodes, widget); | 1233 g_hash_table_remove(nodes, widget); |
1229 | 1234 |
1230 if (window_list) | 1235 if (window_list) |
1231 { | 1236 { |