+ e->xconfigurerequest.detail);
+ if (!config_focus_under_mouse)
+ event_end_ignore_all_enters(ignore_start);
+
+ /* if a stacking change moves the window without resizing */
+ move = TRUE;
+ }
+
+ if ((e->xconfigurerequest.value_mask & CWX) ||
+ (e->xconfigurerequest.value_mask & CWY) ||
+ (e->xconfigurerequest.value_mask & CWWidth) ||
+ (e->xconfigurerequest.value_mask & CWHeight))
+ {
+ if (e->xconfigurerequest.value_mask & CWX) {
+ /* don't allow clients to move shaded windows (fvwm does this)
+ */
+ if (!client->shaded)
+ x = e->xconfigurerequest.x;
+ move = TRUE;
+ }
+ if (e->xconfigurerequest.value_mask & CWY) {
+ /* don't allow clients to move shaded windows (fvwm does this)
+ */
+ if (!client->shaded)
+ y = e->xconfigurerequest.y;
+ move = TRUE;
+ }
+
+ if (e->xconfigurerequest.value_mask & CWWidth) {
+ w = e->xconfigurerequest.width;
+ resize = TRUE;
+ }
+ if (e->xconfigurerequest.value_mask & CWHeight) {
+ h = e->xconfigurerequest.height;
+ resize = TRUE;
+ }
+ }
+
+ ob_debug("ConfigureRequest x(%d) %d y(%d) %d w(%d) %d h(%d) %d "
+ "move %d resize %d\n",
+ e->xconfigurerequest.value_mask & CWX, x,
+ e->xconfigurerequest.value_mask & CWY, y,
+ e->xconfigurerequest.value_mask & CWWidth, w,
+ e->xconfigurerequest.value_mask & CWHeight, h,
+ move, resize);
+
+ /* check for broken apps moving to their root position
+
+ XXX remove this some day...that would be nice. right now all
+ kde apps do this when they try activate themselves on another
+ desktop. eg. open amarok window on desktop 1, switch to desktop
+ 2, click amarok tray icon. it will move by its decoration size.
+ */
+ if (x != client->area.x &&
+ x == (client->frame->area.x + client->frame->size.left -
+ (gint)client->border_width) &&
+ y != client->area.y &&
+ y == (client->frame->area.y + client->frame->size.top -
+ (gint)client->border_width) &&
+ w == client->area.width &&
+ h == client->area.height)
+ {
+ ob_debug_type(OB_DEBUG_APP_BUGS,
+ "Application %s is trying to move via "
+ "ConfigureRequest to it's root window position "
+ "but it is not using StaticGravity\n",
+ client->title);
+ /* don't move it */
+ x = client->area.x;
+ y = client->area.y;
+
+ /* they still requested a move, so don't change whether a
+ notify is sent or not */
+ }
+
+ {
+ gint lw,lh;
+
+ client_try_configure(client, &x, &y, &w, &h, &lw, &lh, FALSE);
+
+ /* if x was not given, then use gravity to figure out the new
+ x. the reference point should not be moved */
+ if ((e->xconfigurerequest.value_mask & CWWidth &&
+ !(e->xconfigurerequest.value_mask & CWX)))
+ client_gravity_resize_w(client, &x, client->area.width, w);
+ /* if y was not given, then use gravity to figure out the new
+ y. the reference point should not be moved */
+ if ((e->xconfigurerequest.value_mask & CWHeight &&
+ !(e->xconfigurerequest.value_mask & CWY)))
+ client_gravity_resize_h(client, &y, client->area.height,h);
+
+ client_find_onscreen(client, &x, &y, w, h, FALSE);
+
+ ob_debug("Granting ConfigureRequest x %d y %d w %d h %d\n",
+ x, y, w, h);
+ client_configure(client, x, y, w, h, FALSE, TRUE, TRUE);