Skip to content

Commit

Permalink
X11: generate clipboard update events (thanks, "chw"!).
Browse files Browse the repository at this point in the history
Partially fixes Bugzilla #2266.
  • Loading branch information
icculus committed May 27, 2015
1 parent 059a030 commit c69a559
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/video/x11/SDL_x11events.c
Expand Up @@ -1219,6 +1219,16 @@ X11_DispatchEvent(_THIS)
}
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);
Expand Down

0 comments on commit c69a559

Please sign in to comment.