A tiling window manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

split: constrain find_frame_number and find_last_frame to a vscreen

Our frames don't span screens anymore due to vscreens, so looking
for a frame should not consider those on other screens or vscreens.

+14 -23
+2 -2
actions.c
··· 2005 2005 /* 2006 2006 * Now that we have a frame number to go to, let's try to jump to it. 2007 2007 */ 2008 - frame = find_frame_number(fnum); 2008 + frame = find_frame_number(rp_current_vscreen, fnum); 2009 2009 if (frame) { 2010 2010 /* 2011 2011 * We have to return a string, because commands get lists of ··· 4594 4594 cmdret * 4595 4595 cmd_focuslast(int interactive, struct cmdarg **args) 4596 4596 { 4597 - rp_frame *frame = find_last_frame(); 4597 + rp_frame *frame = find_last_frame(rp_current_vscreen); 4598 4598 4599 4599 if (frame) 4600 4600 set_active_frame(frame, 0);
+10 -19
split.c
··· 134 134 } 135 135 136 136 rp_frame * 137 - find_last_frame(void) 137 + find_last_frame(rp_vscreen *v) 138 138 { 139 139 rp_frame *cur_frame, *last = NULL; 140 - rp_screen *cur_screen; 141 140 int last_access = -1; 142 141 143 - list_for_each_entry(cur_screen, &rp_screens, node) { 144 - list_for_each_entry(cur_frame, 145 - &cur_screen->current_vscreen->frames, node) { 146 - if (cur_frame->number != 147 - rp_current_vscreen->current_frame && 148 - cur_frame->last_access > last_access) { 149 - last_access = cur_frame->last_access; 150 - last = cur_frame; 151 - } 142 + list_for_each_entry(cur_frame, &v->frames, node) { 143 + if (cur_frame->number != v->current_frame && 144 + cur_frame->last_access > last_access) { 145 + last_access = cur_frame->last_access; 146 + last = cur_frame; 152 147 } 153 148 } 154 149 ··· 1026 1021 } 1027 1022 1028 1023 rp_frame * 1029 - find_frame_number(int num) 1024 + find_frame_number(rp_vscreen *v, int num) 1030 1025 { 1031 1026 rp_frame *cur_frame; 1032 - rp_screen *cur_screen; 1033 1027 1034 - list_for_each_entry(cur_screen, &rp_screens, node) { 1035 - list_for_each_entry(cur_frame, 1036 - &cur_screen->current_vscreen->frames, node) { 1037 - if (cur_frame->number == num) 1038 - return cur_frame; 1039 - } 1028 + list_for_each_entry(cur_frame, &v->frames, node) { 1029 + if (cur_frame->number == num) 1030 + return cur_frame; 1040 1031 } 1041 1032 1042 1033 return NULL;
+2 -2
split.h
··· 49 49 rp_frame *find_frame_left(rp_frame *frame); 50 50 rp_frame *find_frame_down(rp_frame *frame); 51 51 rp_frame *find_frame_up(rp_frame *frame); 52 - rp_frame *find_last_frame(void); 53 - rp_frame *find_frame_number(int num); 52 + rp_frame *find_last_frame(rp_vscreen *v); 53 + rp_frame *find_frame_number(rp_vscreen *v, int num); 54 54 55 55 rp_frame *current_frame(rp_vscreen *v); 56 56