summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2008-04-05 14:09:01 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2008-04-05 14:09:01 +0000
commitc28003060803f2fcd3a3b95bfd5d9a8fe4b9fbcb (patch)
tree4556b4cb2f55887672edd27c3739f532a4efabb5 /src/fe-common
parent68763eb4e8f74c8c363ed97525d3b42f8b29e504 (diff)
downloadirssi-c28003060803f2fcd3a3b95bfd5d9a8fe4b9fbcb.zip
Restore the behaviour of active_window to go to the window with most recent activity
between the ones with highest data level, and make actlist_sort = level match this ordering. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4798 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/window-commands.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/fe-common/core/window-commands.c b/src/fe-common/core/window-commands.c
index ecc4f285..3e262f4d 100644
--- a/src/fe-common/core/window-commands.c
+++ b/src/fe-common/core/window-commands.c
@@ -249,11 +249,11 @@ static WINDOW_REC *window_highest_activity(WINDOW_REC *window)
{
WINDOW_REC *rec, *max_win;
GSList *tmp;
- int max_act, max_ref, through;
+ int max_act, through;
g_return_val_if_fail(window != NULL, NULL);
- max_win = NULL; max_act = 0; max_ref = 0; through = FALSE;
+ max_win = NULL; max_act = 0; through = FALSE;
tmp = g_slist_find(windows, window);
for (;; tmp = tmp->next) {
@@ -267,12 +267,9 @@ static WINDOW_REC *window_highest_activity(WINDOW_REC *window)
rec = tmp->data;
- if (rec->data_level > 0 &&
- (rec->data_level > max_act ||
- (rec->data_level == max_act && rec->refnum < max_ref))) {
+ if (rec->data_level > 0 && max_act < rec->data_level) {
max_act = rec->data_level;
max_win = rec;
- max_ref = rec->refnum;
}
}