- // old and new border areas need to be invalidated,
- // otherwise they will not be erased/redrawn properly
- GdkWindow* parent = gtk_widget_get_parent_window(widget);
- gdk_window_invalidate_rect(parent, &widget->allocation, false);
- gdk_window_invalidate_rect(parent, alloc, false);
+ gdk_window_move_resize(window, x, y, w, h);
+
+ if (border_x + border_y)
+ {
+ // old and new border areas need to be invalidated,
+ // otherwise they will not be erased/redrawn properly
+ GdkWindow* parent = gtk_widget_get_parent_window(widget);
+ gdk_window_invalidate_rect(parent, &widget->allocation, false);
+ gdk_window_invalidate_rect(parent, alloc, false);
+ }