diff options
author | sabetts <sabetts> | 2005-04-17 16:39:45 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2005-04-17 16:39:45 +0000 |
commit | d91136073725f69fc2529fe7407b3767eed7af42 (patch) | |
tree | 7e8a2ef58d03fb846652d61a61b3330622a1b8e5 /src/group.c | |
parent | 4a8f59504e36145ecf41e4fc1e8d247666a0c591 (diff) | |
download | ratpoison-d91136073725f69fc2529fe7407b3767eed7af42.zip |
* src/messages.h (MESSAGE_RAISE_TRANSIENT_GROUP): new define
(MESSAGE_RAISE_WINDOW_GROUP): likewise
* src/group.h (groups_find_group_by_window): new prototype
* src/group.c (groups_find_group_by_window): new function.
* src/events.c (show_rudeness_raise_msg): new function
(map_request): call show_rudeness_raise_msg
(configure_request): likewise
Diffstat (limited to 'src/group.c')
-rw-r--r-- | src/group.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/group.c b/src/group.c index 58c4cd7..fb5b6db 100644 --- a/src/group.c +++ b/src/group.c @@ -134,6 +134,23 @@ groups_find_group_by_number (int n) return NULL; } +/* Return the first group that contains the window. */ +rp_group * +groups_find_group_by_window (rp_window *win) +{ + rp_group *cur; + rp_window_elem *elem; + + list_for_each_entry (cur, &rp_groups, node) + { + elem = group_find_window (&cur->mapped_windows, win); + if (elem) + return cur; + } + + return NULL; +} + rp_window_elem * group_find_window (struct list_head *list, rp_window *win) { |