Changeset 21429 in vbox for trunk/src/VBox/GuestHost/SharedClipboard
- Timestamp:
- Jul 9, 2009 11:16:58 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49817
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp
r21425 r21429 1065 1065 1066 1066 /** 1067 * Notify VBox that we have returned the clipboard to X11. 1068 */ 1069 static void clipReleaseCB(CLIPBACKEND *pCtx) 1070 { 1071 LogFlowFunc (("\n")); 1072 /* The formats should be set to the right values as soon as we start 1073 * polling */ 1074 clipReportEmptyX11CB(pCtx); 1075 pCtx->fOwnsClipboard = false; 1076 } 1077 1078 /** 1067 1079 * This is called by the X toolkit intrinsics to let us know that another 1068 1080 * X11 client has taken the clipboard. In this case we notify VBox that 1069 * we wantownership of the clipboard.1081 * X11 wants ownership of the clipboard. 1070 1082 * @note X11 backend code, callback for XtOwnSelection 1071 1083 */ … … 1074 1086 CLIPBACKEND *pCtx = clipLookupContext(widget); 1075 1087 LogFlowFunc (("\n")); 1076 /* These should be set to the right values as soon as we start polling */ 1077 clipResetX11Formats(pCtx); 1078 pCtx->fOwnsClipboard = false; 1088 clipReleaseCB(pCtx); 1079 1089 } 1080 1090 … … 1864 1874 { 1865 1875 return g_fX11Formats; 1876 } 1877 1878 static void clipInvalidateFormats() 1879 { 1880 g_fX11Formats = ~0; 1866 1881 } 1867 1882 … … 2315 2330 ++cErrs; 2316 2331 2332 /*** Unknown X11 format ***/ 2333 RTPrintf(TEST_NAME ": TESTING handling of an unknown X11 format\n"); 2334 clipInvalidateFormats(); 2335 clipSetSelectionValues("CLIPBOARD", XA_STRING, "Test", 2336 sizeof("Test"), 8); 2337 if (!clipPollTargets()) 2338 { 2339 RTPrintf("Failed to poll for targets\n"); 2340 ++cErrs; 2341 } 2342 else if (clipQueryFormats() != 0) 2343 { 2344 RTPrintf("Failed to send a format update notification\n"); 2345 ++cErrs; 2346 } 2317 2347 2318 2348 /*** Timeout from X11 ***/ … … 2339 2369 RTPrintf("Wrong returned request data, expected %p, got %p\n", 2340 2370 pReq, pReqRet); 2371 ++cErrs; 2372 } 2373 2374 /*** Ensure that VBox is notified when we return the CB to X11 ***/ 2375 RTPrintf(TEST_NAME ": TESTING notification of switch to X11 clipboard\n"); 2376 clipInvalidateFormats(); 2377 clipReleaseCB(pCtx); 2378 if (clipQueryFormats() != 0) 2379 { 2380 RTPrintf("Failed to send a format update (release) notification\n"); 2341 2381 ++cErrs; 2342 2382 }
Note:
See TracChangeset
for help on using the changeset viewer.