comparison console/libgnt/gntmain.c @ 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 d63f59ee6c98
children 2d1b41e3cf0d
comparison
equal deleted inserted replaced
14041:27182f83b79b 14042:143474e2b1cb
65 w = focus_list->data; 65 w = focus_list->data;
66 66
67 /* XXX: ew */ 67 /* XXX: ew */
68 focus_list = g_list_first(focus_list); 68 focus_list = g_list_first(focus_list);
69 focus_list = g_list_append(focus_list, widget); 69 focus_list = g_list_append(focus_list, widget);
70 focus_list = g_list_find(focus_list, widget); 70 focus_list = g_list_find(focus_list, w ? w : widget);
71 71
72 gnt_widget_set_focus(widget, TRUE); 72 gnt_widget_set_focus(widget, TRUE);
73 if (w) 73 if (w)
74 gnt_widget_set_focus(w, FALSE); 74 gnt_widget_set_focus(w, FALSE);
75 draw_taskbar(); 75 draw_taskbar();
755 widget = widget->parent; 755 widget = widget->parent;
756 756
757 gnt_box_sync_children(GNT_BOX(widget)); 757 gnt_box_sync_children(GNT_BOX(widget));
758 node = g_hash_table_lookup(nodes, widget); 758 node = g_hash_table_lookup(nodes, widget);
759 if (node && !node->panel) 759 if (node && !node->panel)
760 {
760 node->panel = new_panel(node->me->window); 761 node->panel = new_panel(node->me->window);
762 if (!GNT_WIDGET_IS_FLAG_SET(node->me, GNT_WIDGET_TRANSIENT))
763 {
764 bottom_panel(node->panel); /* New windows should not grab focus */
765 gnt_widget_set_urgent(node->me);
766 }
767 }
761 768
762 if (window_list.window) 769 if (window_list.window)
763 { 770 {
764 GntNode *nd = g_hash_table_lookup(nodes, window_list.window); 771 GntNode *nd = g_hash_table_lookup(nodes, window_list.window);
765 top_panel(nd->panel); 772 top_panel(nd->panel);