diff options
Diffstat (limited to 'src/events.c')
-rw-r--r-- | src/events.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/events.c b/src/events.c index 26edccb..bb1ddbc 100644 --- a/src/events.c +++ b/src/events.c @@ -58,12 +58,31 @@ new_window (XCreateWindowEvent *e) static void cleanup_frame (rp_window_frame *frame) { - frame->win = find_window_other (); - if (frame->win) + rp_window *win; + + win = find_window_other (); + if (win) { + if (frame->win->transient + && find_window (win->transient_for) == frame->win) + { + } + else + { + hide_transient_for (frame->win); + } + + frame->win = win; + maximize (frame->win); + unhide_transient_for (frame->win); unhide_window (frame->win); } + else + { + hide_transient_for (frame->win); + frame->win = NULL; + } } void |