Added support for Cygwin-X.

Fixes #406.
This commit is contained in:
Camilla Berglund 2015-01-28 00:04:59 +01:00
parent 5f21e213df
commit 75a6d87542
4 changed files with 6 additions and 4 deletions

View File

@ -64,6 +64,7 @@ GLFW bundles a number of dependencies in the `deps/` directory.
- [Cocoa] Bugfix: `glfwSetWindowSize` did not change the video mode for full - [Cocoa] Bugfix: `glfwSetWindowSize` did not change the video mode for full
screen windows screen windows
- [X11] Added support for Cygwin-X
- [X11] Made XInput2 optional at compile-time - [X11] Made XInput2 optional at compile-time
- [X11] Made Xxf86vm optional at compile-time - [X11] Made Xxf86vm optional at compile-time

View File

@ -587,7 +587,7 @@ static GLboolean initExtensions(void)
detectEWMH(); detectEWMH();
// Find or create string format atoms // Find or create string format atoms
_glfw.x11._NULL = XInternAtom(_glfw.x11.display, "NULL", False); _glfw.x11.NULL_ = XInternAtom(_glfw.x11.display, "NULL", False);
_glfw.x11.UTF8_STRING = _glfw.x11.UTF8_STRING =
XInternAtom(_glfw.x11.display, "UTF8_STRING", False); XInternAtom(_glfw.x11.display, "UTF8_STRING", False);
_glfw.x11.COMPOUND_STRING = _glfw.x11.COMPOUND_STRING =

View File

@ -160,7 +160,7 @@ typedef struct _GLFWlibraryX11
Atom CLIPBOARD; Atom CLIPBOARD;
Atom CLIPBOARD_MANAGER; Atom CLIPBOARD_MANAGER;
Atom SAVE_TARGETS; Atom SAVE_TARGETS;
Atom _NULL; Atom NULL_;
Atom UTF8_STRING; Atom UTF8_STRING;
Atom COMPOUND_STRING; Atom COMPOUND_STRING;
Atom ATOM_PAIR; Atom ATOM_PAIR;

View File

@ -28,6 +28,7 @@
#include "internal.h" #include "internal.h"
#include <X11/cursorfont.h> #include <X11/cursorfont.h>
#include <X11/Xmd.h>
#include <sys/select.h> #include <sys/select.h>
@ -632,7 +633,7 @@ static Atom writeTargetToProperty(const XSelectionRequestEvent* request)
XChangeProperty(_glfw.x11.display, XChangeProperty(_glfw.x11.display,
request->requestor, request->requestor,
request->property, request->property,
_glfw.x11._NULL, _glfw.x11.NULL_,
32, 32,
PropModeReplace, PropModeReplace,
NULL, NULL,
@ -1739,7 +1740,7 @@ void _glfwPlatformPostEmptyEvent(void)
event.type = ClientMessage; event.type = ClientMessage;
event.xclient.window = window->x11.handle; event.xclient.window = window->x11.handle;
event.xclient.format = 32; // Data is 32-bit longs event.xclient.format = 32; // Data is 32-bit longs
event.xclient.message_type = _glfw.x11._NULL; event.xclient.message_type = _glfw.x11.NULL_;
XSendEvent(_glfw.x11.display, window->x11.handle, False, 0, &event); XSendEvent(_glfw.x11.display, window->x11.handle, False, 0, &event);
XFlush(_glfw.x11.display); XFlush(_glfw.x11.display);