| 51 |
{"exec", cmd_exec, arg_STRING}, |
{"exec", cmd_exec, arg_STRING}, |
| 52 |
{"fdump", cmd_fdump, arg_STRING}, |
{"fdump", cmd_fdump, arg_STRING}, |
| 53 |
{"focus", cmd_next_frame, arg_VOID}, |
{"focus", cmd_next_frame, arg_VOID}, |
| 54 |
|
{"focusprev", cmd_prev_frame, arg_VOID}, |
| 55 |
{"focusdown", cmd_focusdown, arg_VOID}, |
{"focusdown", cmd_focusdown, arg_VOID}, |
| 56 |
{"focuslast", cmd_focuslast, arg_VOID}, |
{"focuslast", cmd_focuslast, arg_VOID}, |
| 57 |
{"focusleft", cmd_focusleft, arg_VOID}, |
{"focusleft", cmd_focusleft, arg_VOID}, |
| 852 |
char * |
char * |
| 853 |
cmd_prev (int interactive, char *data) |
cmd_prev (int interactive, char *data) |
| 854 |
{ |
{ |
| 855 |
if (!current_window()) |
rp_window *cur, *win; |
| 856 |
{ |
cur = current_window(); |
| 857 |
set_active_window (group_prev_window (rp_current_group, NULL)); |
win = group_prev_window (rp_current_group, cur); |
| 858 |
if (!current_window()) |
|
| 859 |
message (MESSAGE_NO_MANAGED_WINDOWS); |
if (win) |
| 860 |
} |
set_active_window (win); |
| 861 |
|
else if (cur) |
| 862 |
|
message (MESSAGE_NO_OTHER_WINDOW); |
| 863 |
else |
else |
| 864 |
{ |
message (MESSAGE_NO_MANAGED_WINDOWS); |
|
rp_window *win; |
|
|
|
|
|
win = group_prev_window (rp_current_group, current_window()); |
|
|
if (win == NULL) |
|
|
message (MESSAGE_NO_OTHER_WINDOW); |
|
|
else |
|
|
set_active_window (win); |
|
|
} |
|
| 865 |
|
|
| 866 |
return NULL; |
return NULL; |
| 867 |
} |
} |
| 871 |
{ |
{ |
| 872 |
rp_frame *frame; |
rp_frame *frame; |
| 873 |
|
|
| 874 |
frame = find_frame_next (current_frame()); |
frame = find_frame_prev (current_frame()); |
| 875 |
if (!frame) |
if (!frame) |
| 876 |
message (MESSAGE_NO_OTHER_FRAME); |
message (MESSAGE_NO_OTHER_FRAME); |
| 877 |
else |
else |
| 883 |
char * |
char * |
| 884 |
cmd_next (int interactive, char *data) |
cmd_next (int interactive, char *data) |
| 885 |
{ |
{ |
| 886 |
if (!current_window()) |
rp_window *cur, *win; |
| 887 |
{ |
cur = current_window(); |
| 888 |
set_active_window (group_next_window (rp_current_group, NULL)); |
win = group_next_window (rp_current_group, cur); |
| 889 |
if (!current_window()) |
|
| 890 |
message (MESSAGE_NO_MANAGED_WINDOWS); |
if (win) |
| 891 |
} |
set_active_window (win); |
| 892 |
|
else if (cur) |
| 893 |
|
message (MESSAGE_NO_OTHER_WINDOW); |
| 894 |
else |
else |
| 895 |
{ |
message (MESSAGE_NO_MANAGED_WINDOWS); |
|
rp_window *win; |
|
|
|
|
|
win = group_next_window (rp_current_group, current_window()); |
|
|
if (win == NULL) |
|
|
message (MESSAGE_NO_OTHER_WINDOW); |
|
|
else |
|
|
set_active_window (win); |
|
|
} |
|
| 896 |
|
|
| 897 |
return NULL; |
return NULL; |
| 898 |
} |
} |
| 3745 |
|
|
| 3746 |
PRINT_DEBUG (("restore %d %d\n", cur->number, cur->win_number)); |
PRINT_DEBUG (("restore %d %d\n", cur->number, cur->win_number)); |
| 3747 |
|
|
| 3748 |
|
/* Grab the frame's number, but if it already exists request a |
| 3749 |
|
new one. */ |
| 3750 |
|
if (!numset_add_num (s->frames_numset, cur->number)) { |
| 3751 |
|
cur->number = numset_request (s->frames_numset); |
| 3752 |
|
} |
| 3753 |
|
|
| 3754 |
/* Find the current frame based on last_access. */ |
/* Find the current frame based on last_access. */ |
| 3755 |
if (cur->last_access > max) |
if (cur->last_access > max) |
| 3756 |
{ |
{ |
| 3758 |
max = cur->last_access; |
max = cur->last_access; |
| 3759 |
} |
} |
| 3760 |
|
|
|
/* Grab the frame's number, but if it already exists request a |
|
|
new one. */ |
|
|
if (!numset_add_num (s->frames_numset, cur->number)) { |
|
|
cur->number = numset_request (s->frames_numset); |
|
|
} |
|
|
|
|
| 3761 |
/* Update the window the frame points to. */ |
/* Update the window the frame points to. */ |
| 3762 |
if (cur->win_number != EMPTY) |
if (cur->win_number != EMPTY) |
| 3763 |
{ |
{ |