Reduced lagging begind of windows on slower displays In certain situations a speedy mouse might generate more move-events than fluxbox can handle: The event queue will fill up faster than the repositioning of the window is finished. The user will experience a window which lags behind the mouse cursor, aka the window-dance. We now check the next event in the queue and postpone the move a little bit so the queue does not fill up that fast.
Aymeric Vincent vaymeric@users.sf.net
1 files changed,
7 insertions(+),
1 deletions(-)
jump to
M
src/Window.cc
→
src/Window.cc
@@ -2393,6 +2393,7 @@ // to activate it before doing the actual motionNotify code
Fluxbox::instance()->keys()->doAction(me.type, me.state, m_last_pressed_button, context, &winClient(), me.time); if (moving) { + XEvent e; // Warp to next or previous workspace?, must have moved sideways some int moved_x = me.x_root - m_last_resize_x;@@ -2428,7 +2429,6 @@ }
if (new_id != cur_id) { // remove motion events from queue to avoid repeated warps - XEvent e; while (XCheckTypedEvent(display, MotionNotify, &e)) { // might as well update the y-coordinate m_last_resize_y = e.xmotion.y_root;@@ -2453,6 +2453,12 @@ dy -= frame().window().borderWidth();
// dx = current left side, dy = current top doSnapping(dx, dy); + + // do not update display if another motion event is already pending + if (XCheckTypedEvent(display, MotionNotify, &e)) { + XPutBackEvent(display, &e); + return; + } if (!screen().doOpaqueMove()) { parent().drawRectangle(screen().rootTheme()->opGC(),