diff options
author | Dan Gudmundsson <[email protected]> | 2015-01-13 10:57:46 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2015-03-27 09:55:50 +0100 |
commit | 29049ab976919460356b047baa854aadee780f5a (patch) | |
tree | f5d471b801919d79b27c7cead46d6df49520f391 /lib/wx/api_gen/wx_gen_cpp.erl | |
parent | 830652f64fb17ae37743c2571586ab0e0518d679 (diff) | |
download | otp-29049ab976919460356b047baa854aadee780f5a.tar.gz otp-29049ab976919460356b047baa854aadee780f5a.tar.bz2 otp-29049ab976919460356b047baa854aadee780f5a.zip |
wx: On Mac keyboards use meta field as raw_ctrl
On mac and wxWidgets-3.0 the crtlDown field in keyboard and
mouse events are set when command button is pressed.
The ctrl key on mac keyboard is in a field called raw_control as this
would be backward incompatible to add we reuse the metaDown field as
indicator when the ctrl keyboard button is pressed.
Diffstat (limited to 'lib/wx/api_gen/wx_gen_cpp.erl')
-rw-r--r-- | lib/wx/api_gen/wx_gen_cpp.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl index 107d064f4a..720526b3b9 100644 --- a/lib/wx/api_gen/wx_gen_cpp.erl +++ b/lib/wx/api_gen/wx_gen_cpp.erl @@ -975,6 +975,13 @@ build_ret(Name = "ev->m_scanCode",_,#type{base=bool,single=true,by_val=true}) -> w(" rt.addBool(~s);~n",[Name]), w("#else~n rt.addBool(false);~n",[]), w("#endif~n",[]); +build_ret(Name = "ev->m_metaDown",_,#type{base=bool,single=true,by_val=true}) -> + %% Hardcoded workaround for MAC on 2.9 and later + w("#if wxCHECK_VERSION(2,9,0) && defined(_MACOSX)~n", []), + w(" rt.addBool(ev->m_rawControlDown);~n",[]), + w("#else~n rt.addBool(~s);~n",[Name]), + w("#endif~n",[]); + build_ret(Name,_,#type{base=bool,single=true,by_val=true}) -> w(" rt.addBool(~s);~n",[Name]); build_ret(Name,{arg, both},#type{base=int,single=true,mod=M}) -> |