diff options
author | sabetts <sabetts> | 2000-08-26 04:35:10 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2000-08-26 04:35:10 +0000 |
commit | 592583e898157e6047412a398e33ed89b080e1d6 (patch) | |
tree | d8560e0a118150bcfdb8b8ed3f132c8cb0ccf3a5 /list.c | |
parent | d8a5963532fb35687bedee59f2235144f3930fbd (diff) | |
download | ratpoison-592583e898157e6047412a398e33ed89b080e1d6.zip |
- Fixed some of the X_SetInputFocus bugs that were crashing ratpoison.
- Now responds to Raise and Lower X events (fixes the C-x 5 o bug with emacs)
- Added numbers to each window and the ability to jump to that window by
hitting Prefix <window num>
Diffstat (limited to 'list.c')
-rw-r--r-- | list.c | 33 |
1 files changed, 32 insertions, 1 deletions
@@ -121,6 +121,37 @@ prev_window () } rp_window * +find_window_by_number (int n) +{ + int i; + rp_window *cur; + + for (i=0, cur=rp_window_head; cur; cur=cur->next) + { + if (cur->state != STATE_MAPPED) continue; + + if (i == n) return cur; + else i++; + } + + return NULL; +} + +void +goto_window_number (int n) +{ + rp_window *win; + + if ((win = find_window_by_number (n)) == NULL) + { + return; + } + + rp_current_window = win; + set_active_window (rp_current_window); +} + +rp_window * find_last_accessed_window () { int last_access = 0; @@ -128,7 +159,7 @@ find_last_accessed_window () for (cur=rp_window_head; cur; cur=cur->next) { - if (cur->last_access > last_access + if (cur->last_access >= last_access && cur != rp_current_window && cur->state == STATE_MAPPED) { |