mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 01:09:50 +00:00
Changed: #1063 Alt+F4 should prompt for confirm exit (thank you Naush)
This commit is contained in:
parent
389780f076
commit
698648f7e7
1 changed files with 9 additions and 4 deletions
|
@ -32,6 +32,7 @@ static Atom XA_CLIPBOARD = 0;
|
|||
static Atom XA_UTF8_STRING = 0;
|
||||
static Atom XA_TARGETS = 0;
|
||||
static Atom XA_NEL_SEL = 0;
|
||||
static Atom XA_WM_DELETE_WINDOW = 0;
|
||||
|
||||
namespace NLMISC {
|
||||
|
||||
|
@ -62,6 +63,10 @@ void CUnixEventEmitter::init(Display *dpy, Window win, NL3D::IDriver *driver)
|
|||
XA_TARGETS = XInternAtom(dpy, "TARGETS", False);
|
||||
XA_NEL_SEL = XInternAtom(dpy, "NeL_SEL", False);
|
||||
|
||||
// define Atom used by delete window
|
||||
XA_WM_DELETE_WINDOW = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
|
||||
XSetWMProtocols(dpy, win, &XA_WM_DELETE_WINDOW, 1);
|
||||
|
||||
/*
|
||||
TODO: implements all useful events processing
|
||||
EnterWindowMask|LeaveWindowMask|ButtonMotionMask|Button1MotionMask|Button2MotionMask|
|
||||
|
@ -775,10 +780,10 @@ bool CUnixEventEmitter::processMessage (XEvent &event, CEventServer *server)
|
|||
createIM();
|
||||
break;
|
||||
case ClientMessage:
|
||||
// if ((xevent.xclient.format == 32) && (xevent.xclient.data.l[0] == videodata->WM_DELETE_WINDOW))
|
||||
// {
|
||||
// server->postEvent (new CEventDestroyWindow (this));
|
||||
// }
|
||||
if ((event.xclient.format == 32) && (event.xclient.data.l[0] == XA_WM_DELETE_WINDOW))
|
||||
{
|
||||
server->postEvent(new CEventDestroyWindow(this));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// nlinfo("UnknownEvent");
|
||||
|
|
Loading…
Reference in a new issue