mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-23 07:36:16 +00:00
Handle window close message in painter
This commit is contained in:
parent
670412f630
commit
cfba18092d
1 changed files with 3 additions and 1 deletions
|
@ -3043,7 +3043,7 @@ private:
|
||||||
// Callback on mouse events
|
// Callback on mouse events
|
||||||
virtual void operator ()(const CEvent& event)
|
virtual void operator ()(const CEvent& event)
|
||||||
{
|
{
|
||||||
if (event==EventDestroyWindowId)
|
if (event==EventDestroyWindowId || event==EventCloseWindowId)
|
||||||
{
|
{
|
||||||
WindowActive=false;
|
WindowActive=false;
|
||||||
}
|
}
|
||||||
|
@ -4287,6 +4287,7 @@ DWORD WINAPI myThread (LPVOID vData)
|
||||||
CNELU::EventServer.addListener (EventMouseUpId, &listener);
|
CNELU::EventServer.addListener (EventMouseUpId, &listener);
|
||||||
CNELU::EventServer.addListener (EventMouseDblClkId, &listener);
|
CNELU::EventServer.addListener (EventMouseDblClkId, &listener);
|
||||||
CNELU::EventServer.addListener (EventDestroyWindowId, &listener);
|
CNELU::EventServer.addListener (EventDestroyWindowId, &listener);
|
||||||
|
CNELU::EventServer.addListener (EventCloseWindowId, &listener);
|
||||||
CNELU::EventServer.addListener (EventKeyDownId, &listener);
|
CNELU::EventServer.addListener (EventKeyDownId, &listener);
|
||||||
|
|
||||||
// Camera position
|
// Camera position
|
||||||
|
@ -4356,6 +4357,7 @@ DWORD WINAPI myThread (LPVOID vData)
|
||||||
CNELU::EventServer.removeListener (EventMouseDblClkId, &listener);
|
CNELU::EventServer.removeListener (EventMouseDblClkId, &listener);
|
||||||
CNELU::EventServer.removeListener (EventKeyDownId, &listener);
|
CNELU::EventServer.removeListener (EventKeyDownId, &listener);
|
||||||
CNELU::EventServer.removeListener (EventDestroyWindowId, &listener);
|
CNELU::EventServer.removeListener (EventDestroyWindowId, &listener);
|
||||||
|
CNELU::EventServer.removeListener (EventCloseWindowId, &listener);
|
||||||
|
|
||||||
// End.
|
// End.
|
||||||
//========
|
//========
|
||||||
|
|
Loading…
Reference in a new issue