Mercurial > pidgin.yaz
changeset 25528:9d16965bada4
propagate from branch 'im.pidgin.pidgin' (head 7ffd004802947736b5861bf45eb639d28f9c5032)
to branch 'im.pidgin.pidgin.yaz' (head e22efbe785630520c9defdf3517bc7e7f32b2856)
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Tue, 03 Jul 2007 02:30:22 +0000 |
parents | 579ba9866882 (diff) 0f53f60b2018 (current diff) |
children | 1c6abf965d62 |
files | |
diffstat | 2 files changed, 15 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/libgnt/gntwm.c Mon Jul 02 11:26:17 2007 +0000 +++ b/finch/libgnt/gntwm.c Tue Jul 03 02:30:22 2007 +0000 @@ -377,13 +377,7 @@ else if (pos >= 0) wid = g_list_nth_data(wm->cws->list, pos); - wm->cws->ordered = g_list_bring_to_front(wm->cws->ordered, wid); - - gnt_wm_raise_window(wm, wm->cws->ordered->data); - - if (w != wid) { - gnt_widget_set_focus(w, FALSE); - } + gnt_wm_raise_window(wm, wid); } static gboolean @@ -406,7 +400,6 @@ switch_window_n(GntBindable *bind, GList *list) { GntWM *wm = GNT_WM(bind); - GntWidget *w = NULL; GList *l; int n; @@ -418,17 +411,11 @@ else n = 0; - w = wm->cws->ordered->data; - if ((l = g_list_nth(wm->cws->list, n)) != NULL) { gnt_wm_raise_window(wm, l->data); } - if (l && w != l->data) - { - gnt_widget_set_focus(w, FALSE); - } return TRUE; } @@ -1362,7 +1349,6 @@ gnt_ws_draw_taskbar(wm->cws, TRUE); update_screen(wm); if (wm->cws->ordered) { - gnt_widget_set_focus(wm->cws->ordered->data, TRUE); gnt_wm_raise_window(wm, wm->cws->ordered->data); } @@ -1573,15 +1559,11 @@ if (!transient) { GntWS *ws = wm->cws; if (node->me != wm->_list.window) { - GntWidget *w = NULL; if (GNT_IS_BOX(widget)) { ws = new_widget_find_workspace(wm, widget); } - if (ws->ordered) - w = ws->ordered->data; - node->ws = ws; ws->list = g_list_append(ws->list, widget); @@ -1589,13 +1571,10 @@ ws->ordered = g_list_prepend(ws->ordered, widget); else ws->ordered = g_list_append(ws->ordered, widget); - - gnt_widget_set_focus(widget, TRUE); - if (w) - gnt_widget_set_focus(w, FALSE); } - if (wm->event_stack || node->me == wm->_list.window) { + if (wm->event_stack || node->me == wm->_list.window || + node->me == wm->cws->ordered->data) { gnt_wm_raise_window(wm, node->me); } else { bottom_panel(node->panel); /* New windows should not grab focus */ @@ -1976,6 +1955,14 @@ GntWS *ws = gnt_wm_widget_find_workspace(wm, widget); if (wm->cws != ws) gnt_wm_switch_workspace(wm, g_list_index(wm->workspaces, ws)); + if (widget != wm->cws->ordered->data) { + GntWidget *wid = wm->cws->ordered->data; + wm->cws->ordered = g_list_bring_to_front(wm->cws->ordered, widget); + gnt_widget_set_focus(wid, FALSE); + gnt_widget_draw(wid); + } + gnt_widget_set_focus(widget, TRUE); + gnt_widget_draw(widget); g_signal_emit(wm, signals[SIG_GIVE_FOCUS], 0, widget); }
--- a/finch/libgnt/gntws.c Mon Jul 02 11:26:17 2007 +0000 +++ b/finch/libgnt/gntws.c Tue Jul 03 02:30:22 2007 +0000 @@ -114,11 +114,13 @@ g_list_foreach(ws->ordered, widget_hide, nodes); } -void gnt_ws_widget_hide(GntWidget *widget, GHashTable *nodes) { +void gnt_ws_widget_hide(GntWidget *widget, GHashTable *nodes) +{ widget_hide(widget, nodes); } -void gnt_ws_widget_show(GntWidget *widget, GHashTable *nodes) { +void gnt_ws_widget_show(GntWidget *widget, GHashTable *nodes) +{ widget_show(widget, nodes); }