summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2006-02-26 23:20:07 +0000
committersabetts <sabetts>2006-02-26 23:20:07 +0000
commit50171e15dbe6a51464059ad820f5a0464f3d60fa (patch)
treebd8909431b6f2884319f8821bac6bf38d7dad1e4 /src/events.c
parent23b3dd1114f608ffbef9d18b582e28e39fdce7f5 (diff)
downloadratpoison-50171e15dbe6a51464059ad820f5a0464f3d60fa.zip
* 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.
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c60
1 files changed, 38 insertions, 22 deletions
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;
+ }
}
}