+ /* if the client tried to move and we aren't letting it then a
+ synthetic event is needed */
+ config = 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)
+ x = e->xconfigurerequest.x;
+ if (e->xconfigurerequest.value_mask & CWY)
+ y = e->xconfigurerequest.y;
+ if (e->xconfigurerequest.value_mask & CWWidth)
+ w = e->xconfigurerequest.width;
+ if (e->xconfigurerequest.value_mask & CWHeight)
+ h = e->xconfigurerequest.height;
+
+ /* if a new position or size is requested, then a configure is
+ needed */
+ config = TRUE;
+ }
+
+ ob_debug("ConfigureRequest x(%d) %d y(%d) %d w(%d) %d h(%d) %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);
+
+ /* 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))
+ {
+ 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;
+ }
+
+ if (config) {
+ client_find_onscreen(client, &x, &y, w, h, FALSE);
+ client_configure_full(client, x, y, w, h, FALSE, TRUE);