mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
X11 copying code and support PRIMARY & CLIPBOARD clipboards.
This commit is contained in:
+19
-2
@@ -41,8 +41,8 @@
|
||||
#define _NET_WM_STATE_TOGGLE 2
|
||||
|
||||
// Additional mouse button names for XButtonEvent
|
||||
#define Button6 6
|
||||
#define Button7 7
|
||||
#define Button6 6
|
||||
#define Button7 7
|
||||
|
||||
//========================================================================
|
||||
// Error handler for BadMatch errors when requesting context with
|
||||
@@ -1394,6 +1394,23 @@ static void processSingleEvent(void)
|
||||
break;
|
||||
}
|
||||
|
||||
case SelectionRequest:
|
||||
{
|
||||
XSelectionRequestEvent *request = &event.xselectionrequest;
|
||||
// Construct the response
|
||||
XEvent response;
|
||||
response.xselection.property = _glfwSelectionRequest(request);
|
||||
response.xselection.type = SelectionNotify;
|
||||
response.xselection.display = request->display;
|
||||
response.xselection.requestor = request->requestor;
|
||||
response.xselection.selection = request->selection;
|
||||
response.xselection.target = request->target;
|
||||
response.xselection.time = request->time;
|
||||
// Send off the event
|
||||
XSendEvent(_glfwLibrary.X11.display, request->requestor, 0, 0, &response);
|
||||
break;
|
||||
}
|
||||
|
||||
// Was the window destroyed?
|
||||
case DestroyNotify:
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user