1. wxApp::ProcessPendingEvents() is now common, added appcmn.cpp and
regenerated the makefiles. wxPostEvent() should work for wxGTK too (untested) 2. long -> wxCoord change for wxGTK and wxMSW, use wxUSE_COMPATIBLE_COORD_TYPES to get the old behaviour 3. wxHTML compilation fixes (for !wxUSE_HTML case) 4. a couple of handy macros in thread.h added git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -321,7 +321,7 @@ bool wxMouseEvent::Button(int but) const
|
||||
{
|
||||
switch (but) {
|
||||
case -1:
|
||||
return (ButtonUp(-1) || ButtonDown(-1) || ButtonDClick(-1)) ;
|
||||
return (ButtonUp(-1) || ButtonDown(-1) || ButtonDClick(-1));
|
||||
case 1:
|
||||
return (LeftDown() || LeftUp() || LeftDClick());
|
||||
case 2:
|
||||
@@ -601,11 +601,13 @@ void wxEvtHandler::AddPendingEvent(wxEvent& event)
|
||||
|
||||
m_pendingEvents->Append(event2);
|
||||
|
||||
wxPendingEventsLocker->Enter();
|
||||
wxENTER_CRIT_SECT(wxPendingEventsLocker);
|
||||
|
||||
if ( !wxPendingEvents )
|
||||
wxPendingEvents = new wxList;
|
||||
wxPendingEvents->Append(this);
|
||||
wxPendingEventsLocker->Leave();
|
||||
|
||||
wxLEAVE_CRIT_SECT(wxPendingEventsLocker);
|
||||
|
||||
// TODO: Wake up idle handler for the other platforms.
|
||||
#ifdef __WXGTK__
|
||||
@@ -623,9 +625,7 @@ void wxEvtHandler::AddPendingEvent(wxEvent& event)
|
||||
|
||||
void wxEvtHandler::ProcessPendingEvents()
|
||||
{
|
||||
#if wxUSE_THREADS
|
||||
wxCriticalSectionLocker locker(*m_eventsLocker);
|
||||
#endif
|
||||
wxCRIT_SECT_LOCKER(locker, m_eventsLocker);
|
||||
|
||||
wxNode *node = m_pendingEvents->First();
|
||||
wxEvent *event;
|
||||
|
Reference in New Issue
Block a user