소스 검색

X11: generate clipboard update events (thanks, "chw"!).

Partially fixes Bugzilla #2266.
Ryan C. Gordon 10 년 전
부모
커밋
c69a559239
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      src/video/x11/SDL_x11events.c

+ 10 - 0
src/video/x11/SDL_x11events.c

@@ -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);