diff options
| author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-08-06 14:58:34 -0400 |
|---|---|---|
| committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-08-19 10:05:58 -0400 |
| commit | d6f4f4df421cc1c8fe06ef345f65826d5cc7815d (patch) | |
| tree | a210bea122e2d079cda2933af2591ec0b0489939 /Source/Core/DolphinWX/MainNoGUI.cpp | |
| parent | 0dd7f6f5ea816db6dbaf9d7ed424ddb8a58e0847 (diff) | |
MainNoGUI: Move a majority of the event handling from the GLX backend
The only reason the GLX backend handled this at all was because
MainNoGUI didn't make its own window before. This is unused in DolphinWX
builds.
Diffstat (limited to 'Source/Core/DolphinWX/MainNoGUI.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/MainNoGUI.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/MainNoGUI.cpp b/Source/Core/DolphinWX/MainNoGUI.cpp index 74e9cc00a0..9231b3ef3a 100644 --- a/Source/Core/DolphinWX/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/MainNoGUI.cpp @@ -148,6 +148,9 @@ class PlatformX11 : public Platform SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight, 0, 0, BlackPixel(dpy, 0)); XSelectInput(dpy, win, KeyPressMask | FocusChangeMask); + Atom wmProtocols[1]; + wmProtocols[0] = XInternAtom(dpy, "WM_DELETE_WINDOW", True); + XSetWMProtocols(dpy, win, wmProtocols, 1); XMapRaised(dpy, win); XFlush(dpy); windowHandle = (void *) win; @@ -250,6 +253,10 @@ class PlatformX11 : public Platform if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor) XUndefineCursor(dpy, win); break; + case ClientMessage: + if ((unsigned long) event.xclient.data.l[0] == XInternAtom(dpy, "WM_DELETE_WINDOW", False)) + running = false; + break; } } if (!fullscreen) |
