summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-07-18 17:07:54 -0400
committerDana Jansens <danakj@orodu.net>2007-07-18 17:07:54 -0400
commita9065160c953b4c74c2cd4a8173f720318c29d4b (patch)
tree151a9c4393bdce066af8ec227a7b1b215d675147
parent551528c57fcdfb911342bfd6dd271cb14dd251e9 (diff)
don't restack windows when they request it with an invalid sibling
-rw-r--r--openbox/event.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/openbox/event.c b/openbox/event.c
index 3fa017f7..eb2646b5 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -1067,6 +1067,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
if (e->xconfigurerequest.value_mask & CWStackMode) {
ObClient *sibling = NULL;
gulong ignore_start;
+ gboolean ok = TRUE;
/* get the sibling */
if (e->xconfigurerequest.value_mask & CWSibling) {
@@ -1078,16 +1079,22 @@ static void event_handle_client(ObClient *client, XEvent *e)
{
sibling = WINDOW_AS_CLIENT(win);
}
+ else
+ /* an invalid sibling was specified so don't restack at
+ all, it won't make sense no matter what we do */
+ ok = FALSE;
}
- if (!config_focus_under_mouse)
- ignore_start = event_start_ignore_all_enters();
- stacking_restack_request(client, sibling,
- e->xconfigurerequest.detail);
- if (!config_focus_under_mouse)
- event_end_ignore_all_enters(ignore_start);
+ if (ok) {
+ if (!config_focus_under_mouse)
+ ignore_start = event_start_ignore_all_enters();
+ stacking_restack_request(client, sibling,
+ e->xconfigurerequest.detail);
+ if (!config_focus_under_mouse)
+ event_end_ignore_all_enters(ignore_start);
+ }
- /* if a stacking change moves the window without resizing */
+ /* a stacking change moves the window without resizing */
move = TRUE;
}