Mercurial > pidgin.yaz
changeset 14042:143474e2b1cb
[gaim-migrate @ 16648]
Do not give focus to new windows. Instead, set the urgent-hint for them.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 05 Aug 2006 17:04:47 +0000 |
parents | 27182f83b79b |
children | 88ccffe0875c |
files | console/gntblist.c console/libgnt/gntcombobox.c console/libgnt/gntmain.c console/libgnt/gntwidget.h |
diffstat | 4 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/console/gntblist.c Sat Aug 05 11:31:54 2006 +0000 +++ b/console/gntblist.c Sat Aug 05 17:04:47 2006 +0000 @@ -679,6 +679,7 @@ gnt_widget_set_position(box, x, y); GNT_WIDGET_UNSET_FLAGS(box, GNT_WIDGET_CAN_TAKE_FOCUS); + GNT_WIDGET_SET_FLAGS(box, GNT_WIDGET_TRANSIENT); gnt_widget_draw(box); g_free(title);
--- a/console/libgnt/gntcombobox.c Sat Aug 05 11:31:54 2006 +0000 +++ b/console/libgnt/gntcombobox.c Sat Aug 05 17:04:47 2006 +0000 @@ -129,6 +129,7 @@ widget->priv.y - 9 + 1, widget->priv.x); } + GNT_WIDGET_SET_FLAGS(parent, GNT_WIDGET_TRANSIENT); gnt_widget_draw(parent); return TRUE; }
--- a/console/libgnt/gntmain.c Sat Aug 05 11:31:54 2006 +0000 +++ b/console/libgnt/gntmain.c Sat Aug 05 17:04:47 2006 +0000 @@ -67,7 +67,7 @@ /* XXX: ew */ focus_list = g_list_first(focus_list); focus_list = g_list_append(focus_list, widget); - focus_list = g_list_find(focus_list, widget); + focus_list = g_list_find(focus_list, w ? w : widget); gnt_widget_set_focus(widget, TRUE); if (w) @@ -757,7 +757,14 @@ gnt_box_sync_children(GNT_BOX(widget)); node = g_hash_table_lookup(nodes, widget); if (node && !node->panel) + { node->panel = new_panel(node->me->window); + if (!GNT_WIDGET_IS_FLAG_SET(node->me, GNT_WIDGET_TRANSIENT)) + { + bottom_panel(node->panel); /* New windows should not grab focus */ + gnt_widget_set_urgent(node->me); + } + } if (window_list.window) {
--- a/console/libgnt/gntwidget.h Sat Aug 05 11:31:54 2006 +0000 +++ b/console/libgnt/gntwidget.h Sat Aug 05 17:04:47 2006 +0000 @@ -40,6 +40,7 @@ GNT_WIDGET_GROW_X = 1 << 8, GNT_WIDGET_GROW_Y = 1 << 9, GNT_WIDGET_INVISIBLE = 1 << 10, + GNT_WIDGET_TRANSIENT = 1 << 11, } GntWidgetFlags; /* XXX: I'll have to ask grim what he's using this for in guifications. */