Skip to content
Snippets Groups Projects
Commit 5ae78158 authored by A. Tombs's avatar A. Tombs Committed by Camilla Löwy
Browse files

X11: Handle Selection* events despite NULL window

X11 event processing currently discards events that can not be mapped to
a current GLFW window.  However, this breaks clipboard functionality by
failing to respond to SelectionRequest and SelectionClear events.

This commit moves processing of these important clipboard events to
before the NULL window test so that they are always considered.

Fixes #961.
Closes #963.
parent 798d7c6d
No related branches found
No related tags found
No related merge requests found
......@@ -957,6 +957,17 @@ static void processEvent(XEvent *event)
return;
}
if (event->type == SelectionClear)
{
handleSelectionClear(event);
return;
}
else if (event->type == SelectionRequest)
{
handleSelectionRequest(event);
return;
}
window = findWindowByHandle(event->xany.window);
if (window == NULL)
{
......@@ -1476,18 +1487,6 @@ static void processEvent(XEvent *event)
return;
}
case SelectionClear:
{
handleSelectionClear(event);
return;
}
case SelectionRequest:
{
handleSelectionRequest(event);
return;
}
case DestroyNotify:
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment