X11: generate clipboard update events (thanks, "chw"!).
Partially fixes Bugzilla #2266.
--- a/src/video/x11/SDL_x11events.c Tue May 26 21:30:41 2015 -0400
+++ b/src/video/x11/SDL_x11events.c Tue May 26 21:29:45 2015 -0400
@@ -1219,6 +1219,16 @@
}
break;
+ case SelectionClear: {
+ Atom XA_CLIPBOARD = X11_XInternAtom(display, "CLIPBOARD", 0);
+
+ if (xevent.xselectionclear.selection == XA_PRIMARY ||
+ (XA_CLIPBOARD != None && xevent.xselectionclear.selection == XA_CLIPBOARD)) {
+ SDL_SendClipboardUpdate();
+ }
+ }
+ break;
+
default:{
#ifdef DEBUG_XEVENTS
printf("window %p: Unhandled event %d\n", data, xevent.type);