diff options
author | sabetts <sabetts> | 2001-08-23 05:16:17 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2001-08-23 05:16:17 +0000 |
commit | b4bbd9206ca9a5f9b0fec30bb70b04d29e84a8c8 (patch) | |
tree | 92af06e97321df0521cc579686bb01c3ce25595c /src/manage.c | |
parent | d86a6d1adada6ce07151306973d29b0c62235701 (diff) | |
download | ratpoison-b4bbd9206ca9a5f9b0fec30bb70b04d29e84a8c8.zip |
new code to handle transient windows
Diffstat (limited to 'src/manage.c')
-rw-r--r-- | src/manage.c | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/src/manage.c b/src/manage.c index c1113d9..d85e875 100644 --- a/src/manage.c +++ b/src/manage.c @@ -298,7 +298,7 @@ maximize_transient (rp_window *win) /* Set the window's border */ win->border = WINDOW_BORDER_WIDTH; - frame = find_windows_frame (win); + frame = win->frame; /* Honour the window's maximum size */ if (win->hints->flags & PMaxSize) @@ -368,7 +368,7 @@ maximize_normal (rp_window *win) /* Set the window's border */ win->border = WINDOW_BORDER_WIDTH; - frame = find_windows_frame (win); + frame = win->frame; /* Honour the window's maximum size */ if (win->hints->flags & PMaxSize) @@ -500,6 +500,9 @@ hide_window (rp_window *win) { if (win == NULL) return; + /* An unmapped window is not inside a frame. */ + win->frame = NULL; + /* Ignore the unmap_notify event. */ XSelectInput(dpy, win->w, WIN_EVENTS&~(StructureNotifyMask)); XUnmapWindow (dpy, win->w); @@ -520,7 +523,7 @@ unhide_window (rp_window *win) /* same as unhide_window except that it make sure the window is mapped on the bottom of the window stack. */ void -unhide_below_window (rp_window *win) +unhide_window_below (rp_window *win) { if (win == NULL) return; @@ -534,7 +537,6 @@ unhide_below_window (rp_window *win) set_state (win, NormalState); } - void withdraw_window (rp_window *win) { @@ -558,3 +560,27 @@ withdraw_window (rp_window *win) ignore_badwindow--; } + +/* Hide all other mapped windows except for win in win's frame. */ +void +hide_others (rp_window *win) +{ + rp_window_frame *frame; + rp_window *cur; + + if (win == NULL) return; + frame = find_windows_frame (win); + if (frame == NULL) return; + + for (cur = rp_mapped_window_sentinel->next; + cur != rp_mapped_window_sentinel; + cur = cur->next) + { + if (find_windows_frame (cur) + || cur->state != NormalState + || cur->frame != frame) + continue; + + hide_window (cur); + } +} |