- MIN(x, screen_physical_size.width - self->size.width),
- MIN(newy, screen_physical_size.height - self->size.height));
+ MIN(x, screen_physical_size.width - self->size.width -
+ ob_rr_theme->bwidth * 2),
+ MIN(newy, screen_physical_size.height - self->size.height -
+ ob_rr_theme->bwidth * 2));
+ XMoveWindow(ob_display, self->frame, self->location.x, self->location.y);