Changeset 85976 in vbox for trunk/src/VBox/Additions/x11/VBoxClient
- Timestamp:
- Sep 1, 2020 11:35:29 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 140171
- Location:
- trunk/src/VBox/Additions/x11/VBoxClient
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/Makefile.kmk
r84547 r85976 26 26 # 27 27 PROGRAMS += VBoxClient 28 # 29 # Please make sure that you grep the source tree and modify all occurences accordingly 30 # if you rename the following program name. 31 # 28 32 PROGRAMS += VBoxDRMClient 29 33 … … 41 45 VBoxClient_INCS += ../x11include/randrproto-1.6.0 42 46 VBoxClient_SOURCES = \ 43 44 45 46 47 48 47 main.cpp \ 48 display-svga-x11.cpp \ 49 seamless.cpp \ 50 seamless-x11.cpp \ 51 logging.cpp \ 52 hostversion.cpp 49 53 50 54 VBoxDRMClient_TEMPLATE = NewVBoxGuestR3Exe … … 56 60 57 61 VBoxClient_SOURCES.linux = \ 58 62 chk_stubs.c 59 63 VBoxClient_LIBPATH = \ 60 64 $(VBOX_LIBPATH32_X11) 61 65 VBoxClient_LIBS.freebsd = \ 62 66 iconv 63 67 VBoxClient_LIBS.linux = \ 64 68 dl 65 69 VBoxClient_LIBS.netbsd = \ 66 70 crypt 67 71 VBoxClient_LIBS.solaris = \ 68 72 dl 69 73 VBoxClient_LIBS = \ 70 74 X11 Xt Xext Xmu 71 75 ifdef VBOX_WITH_DISTRO_XRAND_XINERAMA 72 76 VBoxClient_DEFS += WITH_DISTRO_XRAND_XINERAMA … … 76 80 # XXX: -L comes from the template, but not rpath 77 81 VBoxClient_LDFLAGS.netbsd = \ 78 82 -Wl,-rpath /usr/X11R7/lib 79 83 80 84 ifdef VBOX_WITH_DRAG_AND_DROP … … 82 86 VBoxClient_DEFS += VBOX_DND_WITH_XTEST 83 87 VBoxClient_LIBS += \ 84 88 Xtst 85 89 endif 86 90 endif … … 91 95 ifeq ($(KBUILD_TARGET),linux) 92 96 VBoxClient_LDFLAGS.amd64 += \ 93 97 -Wl,--wrap=memcpy 94 98 endif 95 99 … … 100 104 ifdef VBOX_WITH_DRAG_AND_DROP 101 105 VBoxClient_DEFS += \ 102 103 106 VBOX_WITH_DRAG_AND_DROP \ 107 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,) 104 108 VBoxClient_SOURCES += \ 105 109 draganddrop.cpp 106 110 VBoxClient_LIBS += \ 107 108 111 $(VBOX_LIB_VBGL_R3) \ 112 $(PATH_STAGE_LIB)/additions/VBoxDnDGuestR3Lib$(VBOX_SUFF_LIB) 109 113 endif 110 114 111 115 ifdef VBOX_WITH_SHARED_CLIPBOARD 112 116 VBoxClient_DEFS += \ 113 114 117 VBOX_WITH_SHARED_CLIPBOARD \ 118 $(if $(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS),VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS,) 115 119 VBoxClient_SOURCES += \ 116 117 118 120 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \ 121 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \ 122 clipboard.cpp 119 123 ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 120 124 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_GUEST 121 125 VBoxClient_SOURCES += \ 122 123 126 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \ 127 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp 124 128 ifdef VBOX_WITH_SHARED_CLIPBOARD_FUSE 125 129 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_FUSE 126 130 # @todo Make this dynamic loading more generic. 127 131 VBoxClient_SOURCES += \ 128 129 132 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount/fuse.cpp \ 133 clipboard-fuse.cpp 130 134 # @todo Ditto. 131 135 VBoxClient_INCS += \ 132 136 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount 133 137 endif 134 138 endif … … 154 158 $$(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run: \ 155 159 $$(tstSeamlessX11-auto_1_STAGE_TARGET) 156 157 160 export VBOX_LOG_DEST=nofile; $(tstSeamlessX11-auto_1_STAGE_TARGET) quiet 161 $(QUIET)$(APPEND) -t "$@" "done" 158 162 159 163 # -
trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
r85962 r85976 56 56 #include <iprt/err.h> 57 57 #include <iprt/file.h> 58 #include <iprt/mem.h> 58 59 #include <iprt/path.h> 59 60 #include <iprt/string.h> … … 679 680 680 681 /** 682 * An abbreviated copy of the VGSvcReadProp from VBoxServiceUtils.cpp 683 */ 684 static int readGuestProperty(uint32_t u32ClientId, const char *pszPropName) 685 { 686 AssertPtrReturn(pszPropName, VERR_INVALID_POINTER); 687 688 uint32_t cbBuf = _1K; 689 void *pvBuf = NULL; 690 int rc = VINF_SUCCESS; /* MSC can't figure out the loop */ 691 692 for (unsigned cTries = 0; cTries < 10; cTries++) 693 { 694 /* 695 * (Re-)Allocate the buffer and try read the property. 696 */ 697 RTMemFree(pvBuf); 698 pvBuf = RTMemAlloc(cbBuf); 699 if (!pvBuf) 700 { 701 VBClLogError("Guest Property: Failed to allocate %zu bytes\n", cbBuf); 702 rc = VERR_NO_MEMORY; 703 break; 704 } 705 char *pszValue; 706 char *pszFlags; 707 uint64_t uTimestamp; 708 rc = VbglR3GuestPropRead(u32ClientId, pszPropName, pvBuf, cbBuf, &pszValue, &uTimestamp, &pszFlags, NULL); 709 if (RT_FAILURE(rc)) 710 { 711 if (rc == VERR_BUFFER_OVERFLOW) 712 { 713 /* try again with a bigger buffer. */ 714 cbBuf *= 2; 715 continue; 716 } 717 else 718 break; 719 } 720 else 721 break; 722 } 723 724 if (pvBuf) 725 RTMemFree(pvBuf); 726 return rc; 727 } 728 729 /** 681 730 * We start VBoxDRMClient from VBoxService in case some guest property is set. 682 731 * We check the same guest property here and dont start this service in case … … 685 734 static bool checkDRMClient() 686 735 { 687 return false; 688 // uint32_t uGuestPropSvcClientID; 689 // int rc = VbglR3GuestPropConnect(&uGuestPropSvcClientID); 690 // if (RT_SUCCESS(rc)) 691 // { 692 // rc = VGSvcCheckPropExist(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/DRMResize"); 693 // if (RT_SUCCESS(rc)) 694 // return true; 695 // } 696 // return false; 736 uint32_t uGuestPropSvcClientID; 737 int rc = VbglR3GuestPropConnect(&uGuestPropSvcClientID); 738 if (RT_FAILURE(rc)) 739 return false; 740 rc = readGuestProperty(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/DRMResize" /*pszPropName*/); 741 if (RT_FAILURE(rc)) 742 return false; 743 return true; 697 744 } 698 745 … … 701 748 /* If DRM client is already running don't start this service. */ 702 749 if (checkDRMClient()) 750 { 751 VBClLogFatalError("DRM resizing is already running. Exiting this service\n"); 703 752 return false; 753 } 704 754 if (isXwayland()) 705 755 {
Note:
See TracChangeset
for help on using the changeset viewer.