summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ec34e73)
Yield (for input events only) inside this function itself instead of forcing
all the code using this function to call wxYield() after it as otherwise the
mouse position change is not taken into account by the subsequent simulated
events.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74328
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#if wxUSE_UIACTIONSIMULATOR
#include "wx/uiaction.h"
#if wxUSE_UIACTIONSIMULATOR
#include "wx/uiaction.h"
+#include "wx/event.h"
+#include "wx/evtloop.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
Window root = display.DefaultRoot();
XWarpPointer(display, None, root, 0, 0, 0, 0, x, y);
Window root = display.DefaultRoot();
XWarpPointer(display, None, root, 0, 0, 0, 0, x, y);
+ // At least with wxGTK we must always process the pending events before the
+ // mouse position change really takes effect, so just do it from here
+ // instead of forcing the client code using this function to always use
+ // wxYield() which is unnecessary under the other platforms.
+ if ( wxEventLoopBase* const loop = wxEventLoop::GetActive() )
+ {
+ loop->YieldFor(wxEVT_CATEGORY_USER_INPUT);
+ }
+