- /* move/resize the frame to match the request */
- if (self->frame) {
- if (self->decorations != fdecor || self->max_horz != fhorz)
- moved = resized = TRUE;
-
- if (moved || resized)
- frame_adjust_area(self->frame, moved, resized, FALSE);
-
- if (!resized && (force_reply || ((!user && moved) || (user && final))))
- {
- XEvent event;
- event.type = ConfigureNotify;
- event.xconfigure.display = ob_display;
- event.xconfigure.event = self->window;
- event.xconfigure.window = self->window;
-
- /* root window real coords */
- event.xconfigure.x = self->frame->area.x + self->frame->size.left -
- self->border_width;
- event.xconfigure.y = self->frame->area.y + self->frame->size.top -
- self->border_width;
- event.xconfigure.width = w;
- event.xconfigure.height = h;
- event.xconfigure.border_width = 0;
- event.xconfigure.above = self->frame->plate;
- event.xconfigure.override_redirect = FALSE;
- XSendEvent(event.xconfigure.display, event.xconfigure.window,
- FALSE, StructureNotifyMask, &event);
- }
+ /* find the frame's dimensions and move/resize it */
+ if (self->decorations != fdecor || self->max_horz != fhorz)
+ moved = resized = TRUE;
+ if (moved || resized)
+ frame_adjust_area(self->frame, moved, resized, FALSE);
+
+ /* find the client's position relative to the root window */
+ oldrx = self->root_pos.x;
+ oldry = self->root_pos.y;
+ rootmoved = (oldrx != (signed)(self->frame->area.x +
+ self->frame->size.left -
+ self->border_width) ||
+ oldry != (signed)(self->frame->area.y +
+ self->frame->size.top -
+ self->border_width));
+
+ if (force_reply || ((!user || (user && final)) && rootmoved))
+ {
+ XEvent event;
+
+ POINT_SET(self->root_pos,
+ self->frame->area.x + self->frame->size.left -
+ self->border_width,
+ self->frame->area.y + self->frame->size.top -
+ self->border_width);
+
+ event.type = ConfigureNotify;
+ event.xconfigure.display = ob_display;
+ event.xconfigure.event = self->window;
+ event.xconfigure.window = self->window;
+
+ /* root window real coords */
+ event.xconfigure.x = self->root_pos.x;
+ event.xconfigure.y = self->root_pos.y;
+ event.xconfigure.width = w;
+ event.xconfigure.height = h;
+ event.xconfigure.border_width = 0;
+ event.xconfigure.above = self->frame->plate;
+ event.xconfigure.override_redirect = FALSE;
+ XSendEvent(event.xconfigure.display, event.xconfigure.window,
+ FALSE, StructureNotifyMask, &event);