mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-14 11:19:07 +00:00
Changed: #1063 Alt+F4 should prompt for confirm exit (thank you Naush)
This commit is contained in:
parent
5152c3bf7c
commit
0674ae79d7
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_UTF8_STRING = 0;
|
||||||
static Atom XA_TARGETS = 0;
|
static Atom XA_TARGETS = 0;
|
||||||
static Atom XA_NEL_SEL = 0;
|
static Atom XA_NEL_SEL = 0;
|
||||||
|
static Atom XA_WM_DELETE_WINDOW = 0;
|
||||||
|
|
||||||
namespace NLMISC {
|
namespace NLMISC {
|
||||||
|
|
||||||
|
@ -62,6 +63,10 @@ void CUnixEventEmitter::init(Display *dpy, Window win, NL3D::IDriver *driver)
|
||||||
XA_TARGETS = XInternAtom(dpy, "TARGETS", False);
|
XA_TARGETS = XInternAtom(dpy, "TARGETS", False);
|
||||||
XA_NEL_SEL = XInternAtom(dpy, "NeL_SEL", 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
|
TODO: implements all useful events processing
|
||||||
EnterWindowMask|LeaveWindowMask|ButtonMotionMask|Button1MotionMask|Button2MotionMask|
|
EnterWindowMask|LeaveWindowMask|ButtonMotionMask|Button1MotionMask|Button2MotionMask|
|
||||||
|
@ -775,10 +780,10 @@ bool CUnixEventEmitter::processMessage (XEvent &event, CEventServer *server)
|
||||||
createIM();
|
createIM();
|
||||||
break;
|
break;
|
||||||
case ClientMessage:
|
case ClientMessage:
|
||||||
// if ((xevent.xclient.format == 32) && (xevent.xclient.data.l[0] == videodata->WM_DELETE_WINDOW))
|
if ((event.xclient.format == 32) && (event.xclient.data.l[0] == XA_WM_DELETE_WINDOW))
|
||||||
// {
|
{
|
||||||
// server->postEvent (new CEventDestroyWindow (this));
|
server->postEvent(new CEventDestroyWindow(this));
|
||||||
// }
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// nlinfo("UnknownEvent");
|
// nlinfo("UnknownEvent");
|
||||||
|
|
Loading…
Reference in a new issue