By moving the cursor slightly after the second press (but before
the second release) it was possible to accidentally trigger both a
DOUBLECLICK and a DRAG action. Doing this on the titlebar would
cause the window to maximize and then immediately unmaximize, which
feels very "glitchy".
As a simple fix, don't allow a press event that is triggering a
DOUBLECLICK to also trigger a DRAG (or CLICK) on the following
release event.
Note: Openbox avoids the issue by processing DOUBLECLICK on the
second release event. If the cursor moves before that, the DRAG
wins out and the DOUBLECLICK isn't processed.