Changeset 69668 in vbox for trunk/src/VBox/GuestHost/SharedClipboard
- Timestamp:
- Nov 13, 2017 9:53:03 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp
r69656 r69668 49 49 50 50 #include <VBox/log.h> 51 #include <VBox/version.h> 51 52 52 53 #include <VBox/GuestHost/SharedClipboard.h> 53 54 #include <VBox/GuestHost/clipboard-helper.h> 54 55 #include <VBox/HostServices/VBoxClipboardSvc.h> 56 57 /* The serialisation mechanism looks like it is not needed (everything using it 58 * runs on one thread, and the flag is always cleared at the end of calls which 59 * use it). So we will remove it after the 5.2 series. */ 60 #if (VBOX_VERSION_MAJOR * 100000 + VBOX_VERSION_MINOR * 1000 + VBOX_VERION_BUILD >= 502051) 61 # define VBOX_AFTER_5_2 62 #endif 55 63 56 64 class formats; … … 215 223 /** The first XFixes event number */ 216 224 int fixesEventBase; 225 #ifndef VBOX_AFTER_5_2 217 226 /** The Xt Intrinsics can only handle one outstanding clipboard operation 218 227 * at a time, so we keep track of whether one is in process. */ … … 221 230 * it for later. */ 222 231 bool fUpdateNeeded; 232 #endif 223 233 }; 224 234 … … 530 540 { 531 541 LogRel2 (("%s: called\n", __FUNCTION__)); 542 #ifndef VBOX_AFTER_5_2 532 543 pCtx->fBusy = false; 533 544 if (pCtx->fUpdateNeeded) … … 538 549 return; 539 550 } 551 #endif 540 552 if (pTargets == NULL) { 541 553 /* No data available */ … … 620 632 LogRel2 (("%s: requesting the targets that the X11 clipboard offers\n", 621 633 __PRETTY_FUNCTION__)); 634 #ifndef VBOX_AFTER_5_2 622 635 if (pCtx->fBusy) 623 636 { … … 626 639 } 627 640 pCtx->fBusy = true; 641 #endif 628 642 #ifndef TESTCASE 629 643 XtGetSelectionValue(pCtx->widget, … … 1736 1750 Assert(pReq->mFormat != 0); /* sanity */ 1737 1751 int rc = VINF_SUCCESS; 1752 #ifndef VBOX_AFTER_5_2 1738 1753 CLIPBACKEND *pCtx = pReq->mCtx; 1754 #endif 1739 1755 void *pvDest = NULL; 1740 1756 uint32_t cbDest = 0; 1741 1757 1758 #ifndef VBOX_AFTER_5_2 1742 1759 pCtx->fBusy = false; 1743 1760 if (pCtx->fUpdateNeeded) 1744 1761 clipQueryX11CBFormats(pCtx); 1762 #endif 1745 1763 if (pvSrc == NULL) 1746 1764 /* The clipboard selection may have changed before we could get it. */ … … 1911 1929 1912 1930 int rc = VINF_SUCCESS; 1931 #ifndef VBOX_AFTER_5_2 1913 1932 bool fBusy = pCtx->fBusy; 1914 1933 pCtx->fBusy = true; … … 1916 1935 /* If the clipboard is busy just fend off the request. */ 1917 1936 rc = VERR_TRY_AGAIN; 1918 else if (pReq->mFormat == VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT) 1937 else 1938 #endif 1939 if (pReq->mFormat == VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT) 1919 1940 { 1920 1941 /* … … 1957 1978 { 1958 1979 rc = VERR_NOT_IMPLEMENTED; 1980 #ifndef VBOX_AFTER_5_2 1959 1981 pCtx->fBusy = false; 1982 #endif 1960 1983 } 1961 1984 if (RT_FAILURE(rc))
Note:
See TracChangeset
for help on using the changeset viewer.