aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen/wx_gen_cpp.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2015-11-22 19:36:04 +0100
committerDan Gudmundsson <[email protected]>2015-11-24 14:34:03 +0100
commit617387025b698c7c7b1d102e35234b2c65dda335 (patch)
tree4ec88aa9b97d0d6a6e23aff695d7729dce2e5246 /lib/wx/api_gen/wx_gen_cpp.erl
parentda4a2d7ca19f967da4561f66659346540d6441c9 (diff)
downloadotp-617387025b698c7c7b1d102e35234b2c65dda335.tar.gz
otp-617387025b698c7c7b1d102e35234b2c65dda335.tar.bz2
otp-617387025b698c7c7b1d102e35234b2c65dda335.zip
wx: Add a command queue check after event sent to erlang
Some events are callbacks inside wxWidgets so idle processing doesn't take place until operation is completed, for instance move/resize window on Windows. This way we get some response while mouse button is pressed.
Diffstat (limited to 'lib/wx/api_gen/wx_gen_cpp.erl')
-rw-r--r--lib/wx/api_gen/wx_gen_cpp.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl
index f26aa64b2b..ed7b27f3bf 100644
--- a/lib/wx/api_gen/wx_gen_cpp.erl
+++ b/lib/wx/api_gen/wx_gen_cpp.erl
@@ -1277,6 +1277,11 @@ encode_events(Evs) ->
w(" } else {~n"),
w(" send_res = rt.send();~n"),
w(" if(cb->skip) event->Skip();~n"),
+ w(" if(app->recurse_level < 1) {~n"),
+ w(" app->recurse_level++;~n"),
+ w(" app->dispatch_cmds();~n"),
+ w(" app->recurse_level--;~n"),
+ w(" }~n"),
w(" };~n"),
w(" return send_res;~n"),
w(" }~n").