+ /* An opaque move can generate a stream of events as the window
+ is dragged around. If the connection round trip time isn't
+ really short, they may come faster than we can respond to
+ them, given the multiple queries we can do to check window
+ manager state, translate coordinates, etc.
+
+ So if this ConfigureNotify is immediately followed by another
+ for the same window, use the info from the latest update, and
+ consider the events all handled. */
+ /* Opaque resize may be trickier; ConfigureNotify events are
+ mixed with Expose events for multiple windows. */
+ configureEvent = *event;
+ while (XPending (dpyinfo->display))
+ {
+ XNextEvent (dpyinfo->display, &next_event);
+ if (next_event.type != ConfigureNotify
+ || next_event.xconfigure.window != event->xconfigure.window
+ /* Skipping events with different sizes can lead to a
+ mispositioned mode line at initial window creation.
+ Only drop window motion events for now. */
+ || next_event.xconfigure.width != event->xconfigure.width
+ || next_event.xconfigure.height != event->xconfigure.height)
+ {
+ XPutBackEvent (dpyinfo->display, &next_event);
+ break;
+ }
+ else
+ configureEvent = next_event;
+ }
+ f = x_top_window_to_frame (dpyinfo, configureEvent.xconfigure.window);