aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2016-11-22 12:40:46 +0100
committerDan Gudmundsson <[email protected]>2016-11-22 12:40:46 +0100
commit3c5f019a3a69d4d18c40dccaa91f522f85c9c92a (patch)
tree322e43426d4a6cd2a67b157c51d91f378814be51 /lib/wx/api_gen
parent04729d8bc0347ef9f6e9d55fe2aac8fe0022e6a1 (diff)
downloadotp-3c5f019a3a69d4d18c40dccaa91f522f85c9c92a.tar.gz
otp-3c5f019a3a69d4d18c40dccaa91f522f85c9c92a.tar.bz2
otp-3c5f019a3a69d4d18c40dccaa91f522f85c9c92a.zip
wx: Do not dispatch commands after frequent events
The user app may want to handle several mouse motion events before drawing new data for example.
Diffstat (limited to 'lib/wx/api_gen')
-rw-r--r--lib/wx/api_gen/wx_gen_cpp.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl
index 0a0b1f9209..d4b6db8153 100644
--- a/lib/wx/api_gen/wx_gen_cpp.erl
+++ b/lib/wx/api_gen/wx_gen_cpp.erl
@@ -1316,7 +1316,8 @@ 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"),
+ #class{id=MouseId} = lists:keyfind("wxMouseEvent", #class.name, Evs),
+ w(" if(app->recurse_level < 1 && Etype->cID != ~p) {~n", [MouseId]),
w(" app->recurse_level++;~n"),
w(" app->dispatch_cmds();~n"),
w(" app->recurse_level--;~n"),