Changeset 68563 in vbox for trunk/src/VBox/GuestHost/SharedClipboard
- Timestamp:
- Aug 31, 2017 12:10:19 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 117780
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp
r63590 r68563 744 744 static int clipLoadXFixes(Display *pDisplay, CLIPBACKEND *pCtx) 745 745 { 746 int dummy1 = 0, dummy2 = 0, rc = VINF_SUCCESS; 747 void *hFixesLib; 748 749 hFixesLib = dlopen("libXfixes.so.1", RTLD_LAZY); 746 int rc; 747 748 void *hFixesLib = dlopen("libXfixes.so.1", RTLD_LAZY); 750 749 if (!hFixesLib) 751 750 hFixesLib = dlopen("libXfixes.so.2", RTLD_LAZY); … … 755 754 hFixesLib = dlopen("libXfixes.so.4", RTLD_LAZY); 756 755 if (hFixesLib) 757 pCtx->fixesSelectInput = 758 (void (*)(Display *, Window, Atom, long unsigned int)) 759 (uintptr_t)dlsym(hFixesLib, "XFixesSelectSelectionInput"); 760 /* For us, a NULL function pointer is a failure */ 761 if (!hFixesLib || !pCtx->fixesSelectInput) 756 { 757 /* For us, a NULL function pointer is a failure */ 758 pCtx->fixesSelectInput = (void (*)(Display *, Window, Atom, long unsigned int)) 759 (uintptr_t)dlsym(hFixesLib, "XFixesSelectSelectionInput"); 760 if (pCtx->fixesSelectInput) 761 { 762 int dummy1 = 0; 763 int dummy2 = 0; 764 if (XQueryExtension(pDisplay, "XFIXES", &dummy1, &pCtx->fixesEventBase, &dummy2) != 0) 765 { 766 if (pCtx->fixesEventBase >= 0) 767 rc = VINF_SUCCESS; 768 else 769 { 770 LogRel(("clipLoadXFixes: fixesEventBase is less than zero: %d\n", pCtx->fixesEventBase)); 771 rc = VERR_NOT_SUPPORTED; 772 } 773 } 774 else 775 { 776 LogRel(("clipLoadXFixes: XQueryExtension failed\n")); 777 rc = VERR_NOT_SUPPORTED; 778 } 779 } 780 else 781 { 782 LogRel(("clipLoadXFixes: Symbol XFixesSelectSelectionInput not found!\n")); 783 rc = VERR_NOT_SUPPORTED; 784 } 785 } 786 else 787 { 788 LogRel(("clipLoadXFixes: libxFixes.so.* not found!\n")); 762 789 rc = VERR_NOT_SUPPORTED; 763 if ( RT_SUCCESS(rc) 764 && !XQueryExtension(pDisplay, "XFIXES", &dummy1, 765 &pCtx->fixesEventBase, &dummy2)) 766 rc = VERR_NOT_SUPPORTED; 767 if (RT_SUCCESS(rc) && pCtx->fixesEventBase < 0) 768 rc = VERR_NOT_SUPPORTED; 790 } 769 791 return rc; 770 792 }
Note:
See TracChangeset
for help on using the changeset viewer.