Mercurial > pidgin.yaz
diff finch/libgnt/gntwm.c @ 18367:1648cd94dddf
Add a callback that gets triggered by SIGWINCH.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 30 Jun 2007 01:45:21 +0000 |
parents | d359e5f3ee87 |
children | 93c5c785a811 |
line wrap: on
line diff
--- a/finch/libgnt/gntwm.c Sat Jun 30 00:55:43 2007 +0000 +++ b/finch/libgnt/gntwm.c Sat Jun 30 01:45:21 2007 +0000 @@ -61,6 +61,7 @@ SIG_GIVE_FOCUS, SIG_KEY_PRESS, SIG_MOUSE_CLICK, + SIG_TERMINAL_REFRESH, SIGS }; @@ -1031,6 +1032,8 @@ endwin(); g_hash_table_foreach(wm->nodes, (GHFunc)refresh_node, NULL); + refresh(); + g_signal_emit(wm, signals[SIG_TERMINAL_REFRESH], 0); update_screen(wm); gnt_ws_draw_taskbar(wm->cws, TRUE); curs_set(0); /* endwin resets the cursor to normal */ @@ -1238,6 +1241,15 @@ gnt_closure_marshal_BOOLEAN__INT_INT_INT_POINTER, G_TYPE_BOOLEAN, 4, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_POINTER); + signals[SIG_TERMINAL_REFRESH] = + g_signal_new("terminal-refresh", + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET(GntWMClass, terminal_refresh), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); + gnt_bindable_class_register_action(GNT_BINDABLE_CLASS(klass), "window-next", window_next, "\033" "n", NULL); gnt_bindable_class_register_action(GNT_BINDABLE_CLASS(klass), "window-prev", window_prev,