From 50171e15dbe6a51464059ad820f5a0464f3d60fa Mon Sep 17 00:00:00 2001 From: sabetts Date: Sun, 26 Feb 2006 23:20:07 +0000 Subject: * src/window.c (add_to_window_list): only change the window's group and frame if window_mapped is 0. * src/data.h (struct rp_child_info): new field window_mapped * src/actions.c (spawn): init window_mapped field in child_info. --- src/events.c | 60 ++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 22 deletions(-) (limited to 'src/events.c') diff --git a/src/events.c b/src/events.c index 8508af2..ded7698 100644 --- a/src/events.c +++ b/src/events.c @@ -597,30 +597,46 @@ property_notify (XEvent *ev) if (win) { - switch (ev->xproperty.atom) + if (ev->xproperty.atom == _net_wm_pid) { - case XA_WM_NAME: - PRINT_DEBUG (("updating window name\n")); - update_window_name (win); - update_window_names (win->scr); - break; - - case XA_WM_NORMAL_HINTS: - PRINT_DEBUG (("updating window normal hints\n")); - update_normal_hints (win); - if (win->state == NormalState) - maximize (win); - break; + struct rp_child_info *child_info; - case XA_WM_TRANSIENT_FOR: - PRINT_DEBUG (("Transient for\n")); - win->transient = XGetTransientForHint (dpy, win->w, &win->transient_for); - break; - - default: - PRINT_DEBUG (("Unhandled property notify event: %ld\n", ev->xproperty.atom)); - break; - } + PRINT_DEBUG (("updating _NET_WM_PID\n")); + child_info = get_child_info(win->w); + if (child_info) + { + if (child_info->frame) + { + PRINT_DEBUG (("frame=%p\n", child_info->frame)); + win->intended_frame_number = child_info->frame->number; + } + /* TODO: also adopt group information? */ + } + } else + switch (ev->xproperty.atom) + { + case XA_WM_NAME: + PRINT_DEBUG (("updating window name\n")); + update_window_name (win); + update_window_names (win->scr); + break; + + case XA_WM_NORMAL_HINTS: + PRINT_DEBUG (("updating window normal hints\n")); + update_normal_hints (win); + if (win->state == NormalState) + maximize (win); + break; + + case XA_WM_TRANSIENT_FOR: + PRINT_DEBUG (("Transient for\n")); + win->transient = XGetTransientForHint (dpy, win->w, &win->transient_for); + break; + + default: + PRINT_DEBUG (("Unhandled property notify event: %ld\n", ev->xproperty.atom)); + break; + } } } -- cgit v1.2.3