aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/c_src/wxe_impl.cpp
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2014-06-16 12:14:10 +0200
committerDan Gudmundsson <[email protected]>2014-06-16 12:14:10 +0200
commita432f076a6e4a515f1aaf8b786367d5a62ce416a (patch)
tree50a592bbb91126a53a2f295333b2319d2cd7c4a9 /lib/wx/c_src/wxe_impl.cpp
parent26e63b26e605a74ba0a0a58c1fb1cb0ba358efed (diff)
parent190c04f50ab22e0227a0d5cfd67767db0b687c97 (diff)
downloadotp-a432f076a6e4a515f1aaf8b786367d5a62ce416a.tar.gz
otp-a432f076a6e4a515f1aaf8b786367d5a62ce416a.tar.bz2
otp-a432f076a6e4a515f1aaf8b786367d5a62ce416a.zip
Merge branch 'dgud/wx/additional-functionality/OTP-11986' into maint
* dgud/wx/additional-functionality/OTP-11986: wx: Fix destroy bug wx: Add wxPopup(Transient)Window wx: Fix non constant define (wxSL_LABELS) wx: Add wxActivateEvent wx: Add missing wxTextCtrl:changeValue OTP-11985
Diffstat (limited to 'lib/wx/c_src/wxe_impl.cpp')
-rw-r--r--lib/wx/c_src/wxe_impl.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp
index f617aaf349..0ee52e3af2 100644
--- a/lib/wx/c_src/wxe_impl.cpp
+++ b/lib/wx/c_src/wxe_impl.cpp
@@ -500,7 +500,7 @@ void WxeApp::destroyMemEnv(wxeMetaCommand& Ecmd)
if(it != ptr2ref.end()) {
wxeRefData *refd = it->second;
if(refd->alloc_in_erl) {
- if((refd->type == 1) && ((wxObject *)ptr)->IsKindOf(CLASSINFO(wxBufferedDC))) {
+ if((refd->type == 4) && ((wxObject *)ptr)->IsKindOf(CLASSINFO(wxBufferedDC))) {
((wxBufferedDC *)ptr)->m_dc = NULL; // Workaround
}
wxString msg;
@@ -539,6 +539,17 @@ void WxeApp::destroyMemEnv(wxeMetaCommand& Ecmd)
refmap.erase((ErlDrvTermData) Ecmd.port);
}
+
+wxeRefData * WxeApp::getRefData(void *ptr) {
+ ptrMap::iterator it = ptr2ref.find(ptr);
+ if(it != ptr2ref.end()) {
+ wxeRefData *refd = it->second;
+ return refd;
+ }
+ return NULL;
+}
+
+
wxeMemEnv * WxeApp::getMemEnv(ErlDrvTermData port) {
return refmap[port];
}