Changeset 82216 in vbox
- Timestamp:
- Nov 26, 2019 9:28:21 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 135030
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/GuestHost/SharedClipboard-x11.h
r82161 r82216 77 77 bool fGrabClipboardOnStart; 78 78 79 /** The best text format X11 has to offer, as an index into the formats 80 * table */ 79 /** The best text format X11 has to offer, as an index into the formats table. */ 81 80 CLIPX11FORMAT X11TextFormat; 82 /** The best bitmap format X11 has to offer, as an index into the formats 83 * table */ 81 /** The best bitmap format X11 has to offer, as an index into the formats table. */ 84 82 CLIPX11FORMAT X11BitmapFormat; 85 /** The best HTML format X11 has to offer, as an index into the formats 86 * table */ 83 /** The best HTML format X11 has to offer, as an index into the formats table. */ 87 84 CLIPX11FORMAT X11HTMLFormat; 88 85 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 89 /** The best HTML format X11 has to offer, as an index into the formats 90 * table */ 86 /** The best HTML format X11 has to offer, as an index into the formats table. */ 91 87 CLIPX11FORMAT X11URIListFormat; 92 88 #endif 93 89 /** What kind of formats does VBox have to offer? */ 94 90 SHCLFORMATS vboxFormats; 95 /** Cache of the last unicode data that we received */91 /** Cache of the last unicode data that we received. */ 96 92 void *pvUnicodeCache; 97 /** Size of the unicode data in the cache */93 /** Size of the unicode data in the cache. */ 98 94 uint32_t cbUnicodeCache; 99 95 /** When we wish the clipboard to exit, we have to wake up the event … … 101 97 * the end that another thread can write to. */ 102 98 int wakeupPipeWrite; 103 /** The reader end of the pipe */99 /** The reader end of the pipe. */ 104 100 int wakeupPipeRead; 105 /** A pointer to the XFixesSelectSelectionInput function */101 /** A pointer to the XFixesSelectSelectionInput function. */ 106 102 void (*fixesSelectInput)(Display *, Window, Atom, unsigned long); 107 /** The first XFixes event number */103 /** The first XFixes event number. */ 108 104 int fixesEventBase; 105 /** XtGetSelectionValue on some versions of libXt isn't re-entrant 106 * so block overlapping requests on this flag. */ 107 bool fXtBusy; 108 /** If a request is blocked on the previous flag, set this flag to request 109 * an update later - the first callback should check and clear this flag 110 * before processing the callback event. */ 111 bool fXtNeedsUpdate; 109 112 } SHCLX11CTX, *PSHCLX11CTX; 110 113 -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp
r82157 r82216 640 640 PSHCLX11CTX pCtx = reinterpret_cast<SHCLX11CTX *>(pClient); 641 641 642 LogFlowFunc(("fXtNeedsUpdate=%RTbool, fXtBusy=%RTbool\n", pCtx->fXtNeedsUpdate, pCtx->fXtBusy)); 643 644 if (pCtx->fXtNeedsUpdate) 645 { 646 // The data from this callback is already out of date. Refresh it. 647 pCtx->fXtNeedsUpdate = false; 648 XtGetSelectionValue(pCtx->widget, 649 clipGetAtom(pCtx, "CLIPBOARD"), 650 clipGetAtom(pCtx, "TARGETS"), 651 clipConvertX11TargetsCallback, pCtx, 652 CurrentTime); 653 return; 654 } 655 else 656 { 657 pCtx->fXtBusy = false; 658 } 659 642 660 Atom *pAtoms = (Atom *)pValue; 643 661 unsigned i, j; … … 711 729 712 730 #ifndef TESTCASE 713 XtGetSelectionValue(pCtx->widget, 714 clipGetAtom(pCtx, "CLIPBOARD"), 715 clipGetAtom(pCtx, "TARGETS"), 716 clipConvertX11TargetsCallback, pCtx, 717 CurrentTime); 731 LogFlowFunc(("fXtBusy=%RTbool\n", pCtx->fXtBusy)); 732 733 if (pCtx->fXtBusy) 734 { 735 pCtx->fXtNeedsUpdate = true; 736 } 737 else 738 { 739 pCtx->fXtBusy = true; 740 XtGetSelectionValue(pCtx->widget, 741 clipGetAtom(pCtx, "CLIPBOARD"), 742 clipGetAtom(pCtx, "TARGETS"), 743 clipConvertX11TargetsCallback, pCtx, 744 CurrentTime); 745 } 718 746 #else 719 747 tstRequestTargets(pCtx); … … 1025 1053 } 1026 1054 1027 pCtx->fHaveX11 = !fHeadless; 1028 pCtx->pFrontend = pParent; 1055 pCtx->fHaveX11 = !fHeadless; 1056 pCtx->pFrontend = pParent; 1057 1058 pCtx->fXtBusy = false; 1059 pCtx->fXtNeedsUpdate = false; 1029 1060 1030 1061 LogFlowFuncLeaveRC(VINF_SUCCESS);
Note:
See TracChangeset
for help on using the changeset viewer.