projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move accel handling in front of the normal keyDown handling
[wxWidgets.git]
/
src
/
x11
/
evtloop.cpp
diff --git
a/src/x11/evtloop.cpp
b/src/x11/evtloop.cpp
index bfcf4917afa6d0f7e7c43dfe25b88a0ab72c240d..146fabde1495ee8ff7e83f2f27e7060643011c48 100644
(file)
--- a/
src/x11/evtloop.cpp
+++ b/
src/x11/evtloop.cpp
@@
-6,7
+6,7
@@
// Created: 01.06.01
// RCS-ID: $Id$
// Copyright: (c) 2002 Julian Smart
// Created: 01.06.01
// RCS-ID: $Id$
// Copyright: (c) 2002 Julian Smart
-// Licen
s
e: wxWindows licence
+// Licen
c
e: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
@@
-122,13
+122,13
@@
bool wxEventLoopImpl::SendIdleEvent()
wxGUIEventLoop::~wxGUIEventLoop()
{
wxGUIEventLoop::~wxGUIEventLoop()
{
- wxASSERT_MSG( !m_impl,
_
T("should have been deleted in Run()") );
+ wxASSERT_MSG( !m_impl,
wx
T("should have been deleted in Run()") );
}
int wxGUIEventLoop::Run()
{
// event loops are not recursive, you need to create another loop!
}
int wxGUIEventLoop::Run()
{
// event loops are not recursive, you need to create another loop!
- wxCHECK_MSG( !
IsRunning(), -1, _
T("can't reenter a message loop") );
+ wxCHECK_MSG( !
m_impl, -1, wx
T("can't reenter a message loop") );
m_impl = new wxEventLoopImpl;
m_impl = new wxEventLoopImpl;
@@
-162,18
+162,18
@@
int wxGUIEventLoop::Run()
OnExit();
int exitcode = m_impl->GetExitCode();
OnExit();
int exitcode = m_impl->GetExitCode();
- delete m_impl;
- m_impl = NULL;
+ wxDELETE(m_impl);
return exitcode;
}
void wxGUIEventLoop::Exit(int rc)
{
return exitcode;
}
void wxGUIEventLoop::Exit(int rc)
{
- wxCHECK_RET( IsRunning(), _T("can't call Exit() if not running") );
-
- m_impl->SetExitCode(rc);
- m_impl->m_keepGoing = false;
+ if ( m_impl )
+ {
+ m_impl->SetExitCode(rc);
+ m_impl->m_keepGoing = false;
+ }
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
@@
-188,6
+188,10
@@
bool wxGUIEventLoop::Pending() const
bool wxGUIEventLoop::Dispatch()
{
bool wxGUIEventLoop::Dispatch()
{
+ // see comment in wxEventLoopManual::ProcessEvents()
+ if ( wxTheApp )
+ wxTheApp->ProcessPendingEvents();
+
XEvent event;
// TODO allowing for threads, as per e.g. wxMSW
XEvent event;
// TODO allowing for threads, as per e.g. wxMSW