diff --git a/src/client.c b/src/client.c index 2271f254..361566fa 100644 --- a/src/client.c +++ b/src/client.c @@ -245,6 +245,20 @@ void wClientConfigure(WWindow * wwin, XConfigureRequestEvent * xcre) wwin->flags.maximized &= ~(MAX_VERTICAL | MAX_LEFTHALF | MAX_RIGHTHALF | MAX_MAXIMUS | MAX_CENTRAL); wWindowConstrainSize(wwin, (unsigned int *)&nwidth, (unsigned int *)&nheight); + + /* Ignore tiny position adjustments from client ConfigureRequests to prevent + * window jitters (e.g., VirtualBox sending incremental 1-2px corrections). */ + if (wwin->flags.mapped && !wwin->moveresize.active && (xcre->value_mask & (CWX | CWY))) { + int dx = abs(nx - wwin->frame_x); + int dy = abs(ny - wwin->frame_y); + + if (dx < 3 && dy < 3) { + /* Keep current position */ + nx = wwin->frame_x; + ny = wwin->frame_y; + } + } + wWindowConfigure(wwin, nx, ny, nwidth, nheight); wwin->old_geometry.x = nx; wwin->old_geometry.y = ny; diff --git a/src/window.c b/src/window.c index 25170951..8a14a034 100644 --- a/src/window.c +++ b/src/window.c @@ -681,6 +681,15 @@ WWindow *wManageWindow(WScreen *scr, Window window) return NULL; } + /* Some applications create placeholder windows with 1x1 size + * (e.g. VirtualBox internal windows). Don't manage those initial + * 1x1 windows — wait for a proper ConfigureNotify/MapRequest with + * a real size. */ + if (wattribs.width <= 1 && wattribs.height <= 1) { + XUngrabServer(dpy); + return NULL; + } + wm_state = PropGetWindowState(window); /* if it's startup and the window is unmapped, don't manage it */