Changed: Process EventCloseWindowId by client
This commit is contained in:
parent
cfad8b1ecb
commit
cc09e4ba09
2 changed files with 9 additions and 2 deletions
|
@ -90,6 +90,7 @@ void CEventsListener::addToServer(CEventServer& server)
|
||||||
server.addListener(EventKeyDownId, this);
|
server.addListener(EventKeyDownId, this);
|
||||||
server.addListener(EventKeyUpId, this);
|
server.addListener(EventKeyUpId, this);
|
||||||
server.addListener(EventDestroyWindowId,this);
|
server.addListener(EventDestroyWindowId,this);
|
||||||
|
server.addListener(EventCloseWindowId, this);
|
||||||
server.addListener(EventSetFocusId, this);
|
server.addListener(EventSetFocusId, this);
|
||||||
server.addListener(EventDisplayChangeId, this);
|
server.addListener(EventDisplayChangeId, this);
|
||||||
}// addToServer //
|
}// addToServer //
|
||||||
|
@ -108,6 +109,7 @@ void CEventsListener::removeFromServer (CEventServer& server)
|
||||||
server.removeListener(EventKeyDownId, this);
|
server.removeListener(EventKeyDownId, this);
|
||||||
server.removeListener(EventKeyUpId, this);
|
server.removeListener(EventKeyUpId, this);
|
||||||
server.removeListener(EventDestroyWindowId,this);
|
server.removeListener(EventDestroyWindowId,this);
|
||||||
|
server.removeListener(EventCloseWindowId, this);
|
||||||
server.removeListener(EventSetFocusId, this);
|
server.removeListener(EventSetFocusId, this);
|
||||||
}// removeFromServer //
|
}// removeFromServer //
|
||||||
|
|
||||||
|
@ -141,6 +143,11 @@ void CEventsListener::operator()(const CEvent& event)
|
||||||
// kill process
|
// kill process
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
// Window close button pressed.
|
||||||
|
if(event == EventCloseWindowId)
|
||||||
|
{
|
||||||
|
CAHManager::getInstance()->runActionHandler("enter_modal", NULL, "group=ui:interface:quit_dialog");
|
||||||
|
}
|
||||||
// Event from the Mouse (ANGLE)
|
// Event from the Mouse (ANGLE)
|
||||||
if(event == EventGDMouseMove)
|
if(event == EventGDMouseMove)
|
||||||
{
|
{
|
||||||
|
|
|
@ -94,6 +94,7 @@ void CInputHandlerManager::addToServer(NLMISC::CEventServer * server)
|
||||||
// System
|
// System
|
||||||
server->addListener(EventGDMouseMove, this);
|
server->addListener(EventGDMouseMove, this);
|
||||||
server->addListener(EventDestroyWindowId, this);
|
server->addListener(EventDestroyWindowId, this);
|
||||||
|
server->addListener(EventCloseWindowId, this);
|
||||||
server->addListener(EventSetFocusId, this);
|
server->addListener(EventSetFocusId, this);
|
||||||
server->addListener(EventDisplayChangeId, this);
|
server->addListener(EventDisplayChangeId, this);
|
||||||
|
|
||||||
|
@ -118,6 +119,7 @@ void CInputHandlerManager::release()
|
||||||
// System
|
// System
|
||||||
_EventServer->removeListener(EventGDMouseMove, this);
|
_EventServer->removeListener(EventGDMouseMove, this);
|
||||||
_EventServer->removeListener(EventDestroyWindowId, this);
|
_EventServer->removeListener(EventDestroyWindowId, this);
|
||||||
|
_EventServer->removeListener(EventCloseWindowId, this);
|
||||||
_EventServer->removeListener(EventSetFocusId, this);
|
_EventServer->removeListener(EventSetFocusId, this);
|
||||||
_EventServer->removeListener(EventDisplayChangeId, this);
|
_EventServer->removeListener(EventDisplayChangeId, this);
|
||||||
|
|
||||||
|
@ -133,10 +135,8 @@ void CInputHandlerManager::release()
|
||||||
_EventServer->removeListener(EventCharId, this);
|
_EventServer->removeListener(EventCharId, this);
|
||||||
_EventServer->removeListener(EventKeyDownId, this);
|
_EventServer->removeListener(EventKeyDownId, this);
|
||||||
_EventServer->removeListener(EventKeyUpId, this);
|
_EventServer->removeListener(EventKeyUpId, this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CInputHandlerManager::operator ()(const NLMISC::CEvent &event)
|
void CInputHandlerManager::operator ()(const NLMISC::CEvent &event)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue