mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 00:30:57 +00:00
Re-worked and fixed X11 clipboard support.
This commit is contained in:
+9
-1
@@ -597,11 +597,15 @@ static GLboolean initDisplay(void)
|
||||
// the keyboard mapping.
|
||||
updateKeyCodeLUT();
|
||||
|
||||
// Find or create selection property atom
|
||||
_glfwLibrary.X11.selection.property =
|
||||
XInternAtom(_glfwLibrary.X11.display, "GLFW_SELECTION", False);
|
||||
|
||||
// Find or create clipboard atom
|
||||
_glfwLibrary.X11.selection.atom =
|
||||
XInternAtom(_glfwLibrary.X11.display, "CLIPBOARD", False);
|
||||
|
||||
// Find or create selection atoms
|
||||
// Find or create selection target atoms
|
||||
_glfwLibrary.X11.selection.formats[_GLFW_CLIPBOARD_FORMAT_UTF8] =
|
||||
XInternAtom(_glfwLibrary.X11.display, "UTF8_STRING", False);
|
||||
_glfwLibrary.X11.selection.formats[_GLFW_CLIPBOARD_FORMAT_COMPOUND] =
|
||||
@@ -609,6 +613,10 @@ static GLboolean initDisplay(void)
|
||||
_glfwLibrary.X11.selection.formats[_GLFW_CLIPBOARD_FORMAT_STRING] =
|
||||
XA_STRING;
|
||||
|
||||
_glfwLibrary.X11.selection.targets = XInternAtom(_glfwLibrary.X11.display,
|
||||
"TARGETS",
|
||||
False);
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user