vbox的更動 62883 路徑 trunk/src/VBox/Additions
- 時間撮記:
- 2016-8-2 下午03:51:18 (8 年 以前)
- 位置:
- trunk/src/VBox/Additions/x11/VBoxClient
- 檔案:
-
- 修改 9 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Additions/x11/VBoxClient/VBoxClient.h
r62530 r62883 58 58 59 59 /** Default handler for various struct VBCLSERVICE member functions. */ 60 static intVBClServiceDefaultHandler(struct VBCLSERVICE **pSelf)60 DECLINLINE(int) VBClServiceDefaultHandler(struct VBCLSERVICE **pSelf) 61 61 { 62 RT_NOREF1(pSelf); 62 63 return VINF_SUCCESS; 63 64 } … … 66 67 * Usually used because the service is cleaned up automatically when the user 67 68 * process/X11 exits. */ 68 static voidVBClServiceDefaultCleanup(struct VBCLSERVICE **ppInterface)69 DECLINLINE(void) VBClServiceDefaultCleanup(struct VBCLSERVICE **ppInterface) 69 70 { 70 71 NOREF(ppInterface); -
trunk/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
r62530 r62883 85 85 * returned 86 86 */ 87 int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, 88 void **ppv, uint32_t *pcb) 89 { 87 int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb) 88 { 89 RT_NOREF1(pCtx); 90 90 int rc = VINF_SUCCESS; 91 91 uint32_t cb = 1024; … … 148 148 void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats) 149 149 { 150 int rc;150 RT_NOREF1(pCtx); 151 151 LogRelFlowFunc(("u32Formats=%d\n", u32Formats)); 152 rc = VbglR3ClipboardReportFormats(g_ctx.client, u32Formats);152 int rc = VbglR3ClipboardReportFormats(g_ctx.client, u32Formats); 153 153 LogRelFlowFunc(("rc=%Rrc\n", rc)); 154 154 } … … 164 164 * @param cb the size of the data in @a pv 165 165 */ 166 void ClipCompleteDataRequestFromX11(VBOXCLIPBOARDCONTEXT *pCtx, int rc, 167 CLIPREADCBREQ *pReq, void *pv, 168 uint32_t cb) 169 { 166 void ClipCompleteDataRequestFromX11(VBOXCLIPBOARDCONTEXT *pCtx, int rc, CLIPREADCBREQ *pReq, void *pv, uint32_t cb) 167 { 168 RT_NOREF1(pCtx); 170 169 if (RT_SUCCESS(rc)) 171 170 vboxClipboardSendData(pReq->u32Format, pv, cb); … … 287 286 static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised) 288 287 { 289 int rc; 290 291 NOREF(ppInterface); 288 RT_NOREF2(ppInterface, fDaemonised); 289 292 290 /* Initialise the guest library. */ 293 rc = VbglR3InitUser();291 int rc = VbglR3InitUser(); 294 292 if (RT_FAILURE(rc)) 295 293 VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc)); -
trunk/src/VBox/Additions/x11/VBoxClient/display.cpp
r62530 r62883 103 103 RTStrPrintf(szCommand, sizeof(szCommand), "%s -s %ux%u", 104 104 pState->pcszXrandr, ((unsigned long *)pData)[0] >> 16, ((unsigned long *)pData)[0] & 0xFFFF); 105 system(szCommand);105 int rcShutUpGcc = system(szCommand); RT_NOREF_PV(rcShutUpGcc); 106 106 XFree(pData); 107 107 } … … 128 128 char szCommand[sizeof(szCommandBase) + 256]; 129 129 RTStrPrintf(szCommand, sizeof(szCommand), szCommandBase, pState->pcszXrandr); 130 system(szCommand);130 int rcShutUpGcc = system(szCommand); RT_NOREF_PV(rcShutUpGcc); 131 131 } 132 132 } … … 252 252 static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised) 253 253 { 254 RT_NOREF1(fDaemonised); 254 255 struct DISPLAYSTATE *pSelf = getStateFromInterface(ppInterface); 255 int rc;256 256 257 257 if (!pSelf->mfInit) -
trunk/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp
r61656 r62883 921 921 { 922 922 bool fAcceptDrop = ASMBitTest (&e.xclient.data.l[XdndStatusFlags], 0); /* Does the target accept the drop? */ 923 RTCString strActions = xAtomToString( e.xclient.data.l[XdndStatusAction]); 924 #ifdef LOG_ENABLED 923 925 bool fWantsPosition = ASMBitTest (&e.xclient.data.l[XdndStatusFlags], 1); /* Does the target want XdndPosition messages? */ 924 RTCString strActions = xAtomToString( e.xclient.data.l[XdndStatusAction]);925 926 926 char *pszWndName = wndX11GetNameA(e.xclient.data.l[XdndStatusWindow]); 927 927 AssertPtr(pszWndName); … … 937 937 RTStrFree(pszWndName); 938 938 939 uint16_t x = RT_HI_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgXY]); 940 uint16_t y = RT_LO_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgXY]); 941 uint16_t w = RT_HI_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgWH]); 942 uint16_t h = RT_LO_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgWH]); 943 LogFlowThisFunc(("\tReported dead area: x=%RU16, y=%RU16, w=%RU16, h=%RU16\n", x, y, w, h)); 939 uint16_t x = RT_HI_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgXY]); 940 uint16_t y = RT_LO_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgXY]); 941 uint16_t cx = RT_HI_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgWH]); 942 uint16_t cy = RT_LO_U16((uint32_t)e.xclient.data.l[XdndStatusNoMsgWH]); 943 LogFlowThisFunc(("\tReported dead area: x=%RU16, y=%RU16, cx=%RU16, cy=%RU16\n", x, y, cx, cy)); 944 #endif 944 945 945 946 uint32_t uAction = DND_IGNORE_ACTION; /* Default is ignoring. */ … … 952 953 else if (e.xclient.message_type == xAtom(XA_XdndFinished)) 953 954 { 955 #ifdef LOG_ENABLED 954 956 bool fSucceeded = ASMBitTest(&e.xclient.data.l[XdndFinishedFlags], 0); 955 957 … … 963 965 964 966 RTStrFree(pszWndName); 967 #endif 965 968 966 969 reset(); … … 1072 1075 break; 1073 1076 } 1074 1075 int32_t lPos = e.xclient.data.l[XdndPositionXY];1077 #ifdef LOG_ENABLED 1078 int32_t iPos = e.xclient.data.l[XdndPositionXY]; 1076 1079 Atom atmAction = m_curVer >= 2 /* Actions other than "copy" or only supported since protocol version 2. */ 1077 1080 ? e.xclient.data.l[XdndPositionAction] : xAtom(XA_XdndActionCopy); 1078 1079 1081 LogFlowThisFunc(("XA_XdndPosition: wndProxy=%#x, wndCur=%#x, x=%RI32, y=%RI32, strAction=%s\n", 1080 m_wndProxy.hWnd, m_wndCur, RT_HIWORD( lPos), RT_LOWORD(lPos),1082 m_wndProxy.hWnd, m_wndCur, RT_HIWORD(iPos), RT_LOWORD(iPos), 1081 1083 xAtomToString(atmAction).c_str())); 1084 #endif 1082 1085 1083 1086 bool fAcceptDrop = true; … … 1166 1169 int DragInstance::onX11MotionNotify(const XEvent &e) 1167 1170 { 1171 RT_NOREF1(e); 1168 1172 LogFlowThisFunc(("mode=%RU32, state=%RU32\n", m_enmMode, m_enmState)); 1169 1173 … … 1182 1186 int DragInstance::onX11SelectionClear(const XEvent &e) 1183 1187 { 1188 RT_NOREF1(e); 1184 1189 LogFlowThisFunc(("mode=%RU32, state=%RU32\n", m_enmMode, m_enmState)); 1185 1190 … … 1332 1337 pReq->requestor, 1333 1338 gX11->xErrorToString(xRc).c_str())); 1339 NOREF(xRc); 1334 1340 } 1335 1341 } … … 1855 1861 int DragInstance::hgDrop(uint32_t u32xPos, uint32_t u32yPos, uint32_t uDefaultAction) 1856 1862 { 1863 1864 1865 /** @todo r=bird: Please, stop using 'u32' as a prefix unless you've got a _real_ _important_ reason for needing the bit count. */ 1866 1867 1868 RT_NOREF3(u32xPos, u32yPos, uDefaultAction); 1857 1869 LogFlowThisFunc(("wndCur=%#x, wndProxy=%#x, mode=%RU32, state=%RU32\n", m_wndCur, m_wndProxy.hWnd, m_enmMode, m_enmState)); 1858 1870 LogFlowThisFunc(("u32xPos=%RU32, u32yPos=%RU32, uAction=%RU32\n", u32xPos, u32yPos, uDefaultAction)); … … 2295 2307 { 2296 2308 int rc2 = VbglR3DnDGHSendError(&m_dndCtx, rc); 2297 LogFlowThisFunc(("Sending error to host resulted in %Rrc\n", rc2)); 2309 LogFlowThisFunc(("Sending error to host resulted in %Rrc\n", rc2)); NOREF(rc2); 2298 2310 /* This is not fatal for us, just ignore. */ 2299 2311 } … … 2506 2518 2507 2519 LogFlowThisFunc(("fInRootWnd=%RTbool, wndRoot=0x%x, wndChild=0x%x, iRootX=%d, iRootY=%d\n", 2508 RT_BOOL(fInRootWnd), wndRoot, wndChild, iRootX, iRootY)); 2520 RT_BOOL(fInRootWnd), wndRoot, wndChild, iRootX, iRootY)); NOREF(fInRootWnd); 2509 2521 2510 2522 if (piRootX) … … 2765 2777 int DragInstance::toAtomList(const void *pvData, uint32_t cbData, VBoxDnDAtomList &lstAtoms) const 2766 2778 { 2779 RT_NOREF1(lstAtoms); 2767 2780 AssertPtrReturn(pvData, VERR_INVALID_POINTER); 2768 2781 AssertReturn(cbData, VERR_INVALID_PARAMETER); … … 3030 3043 int DragAndDropService::run(bool fDaemonised /* = false */) 3031 3044 { 3045 RT_NOREF1(fDaemonised); 3032 3046 LogFlowThisFunc(("fDaemonised=%RTbool\n", fDaemonised)); 3033 3047 -
trunk/src/VBox/Additions/x11/VBoxClient/hostversion.cpp
r62530 r62883 76 76 DBusMessageIter iter; 77 77 DBusMessageIter array; 78 DBusMessageIter dict;79 DBusMessageIter value;80 DBusMessageIter variant;81 DBusMessageIter data;78 /*DBusMessageIter dict; - unused */ 79 /*DBusMessageIter value; - unused */ 80 /*DBusMessageIter variant; - unused */ 81 /*DBusMessageIter data; - unused */ 82 82 83 83 /* Format: UINT32 org.freedesktop.Notifications.Notify … … 101 101 102 102 DBusMessage *reply; 103 reply = dbus_connection_send_with_reply_and_block(conn, msg, 104 30 * 1000 /* 30 seconds timeout */, &err); 103 reply = dbus_connection_send_with_reply_and_block(conn, msg, 30 * 1000 /* 30 seconds timeout */, &err); 105 104 if (dbus_error_is_set(&err)) 106 {107 105 LogRel(("D-BUS returned an error while sending the notification: %s", err.message)); 108 }109 106 else if (reply) 110 107 { -
trunk/src/VBox/Additions/x11/VBoxClient/main.cpp
r62530 r62883 46 46 #include "VBoxClient.h" 47 47 48 static int (*gpfnOldIOErrorHandler)(Display *) = NULL; 48 /*static int (*gpfnOldIOErrorHandler)(Display *) = NULL; - unused */ 49 49 50 50 /** Object representing the service we are running. This has to be global … … 73 73 pszCommand = RTStrAPrintf2("notify-send \"VBoxClient: %s\"", pszMessage); 74 74 if (pszCommand) 75 system(pszCommand); 75 { 76 int rcShutUpGcc = system(pszCommand); RT_NOREF_PV(rcShutUpGcc); 77 } 76 78 } 77 79 _exit(1); … … 124 126 static int vboxClientXLibIOErrorHandler(Display *pDisplay) 125 127 { 128 RT_NOREF1(pDisplay); 126 129 LogRel(("VBoxClient: a fatal guest X Window error occurred. This may just mean that the Window system was shut down while the client was still running.\n")); 127 130 VBClCleanUp(); -
trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.cpp
r62530 r62883 477 477 { 478 478 LogRelFlowFunc(("\n")); 479 unsigned cRects = 0;480 479 struct RectList rects = RTVEC_INITIALIZER; 481 480 482 if ( 0 != mcRects)481 if (mcRects != 0) 483 482 { 484 483 int rc = RectListReserve(&rects, mcRects * 2); -
trunk/src/VBox/Additions/x11/VBoxClient/seamless.cpp
r62530 r62883 191 191 * The actual X11 window configuration change monitor thread function. 192 192 */ 193 int SeamlessMain::x11MonitorThread(RTTHREAD self, void *pvUser) 194 { 193 int SeamlessMain::x11MonitorThread(RTTHREAD hThreadSelf, void *pvUser) 194 { 195 RT_NOREF1(hThreadSelf); 195 196 SeamlessMain *pHost = (SeamlessMain *)pvUser; 196 197 int rc = VINF_SUCCESS; … … 333 334 static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised) 334 335 { 336 RT_NOREF1(fDaemonised); 335 337 struct SEAMLESSSERVICE *pSelf = getClassFromInterface(ppInterface); 336 338 int rc; -
trunk/src/VBox/Additions/x11/VBoxClient/testcase/tstSeamlessX11-auto.cpp
r62530 r62883 55 55 Display *XOpenDisplay(const char *display_name) 56 56 { 57 RT_NOREF1(display_name); 57 58 return TEST_DISPLAY; 58 59 } … … 61 62 int XCloseDisplay(Display *display) 62 63 { 64 RT_NOREF1(display); 63 65 Assert(display == TEST_DISPLAY); 64 66 return 0; … … 71 73 }; 72 74 73 extern "C" Atom XInternAtom(Display *display, const char *atom_name, 74 Bool only_if_exists); 75 Atom XInternAtom(Display *display, const char *atom_name, Bool only_if_exists) 76 { 75 extern "C" Atom XInternAtom(Display *display, const char *atom_name, Bool only_if_exists); 76 Atom XInternAtom(Display *display, const char *atom_name, Bool only_if_exists) 77 { 78 RT_NOREF2(only_if_exists, display); 77 79 Assert(display == TEST_DISPLAY); 78 80 if (!RTStrCmp(atom_name, WM_TYPE_PROP)) … … 96 98 unsigned long *bytes_after_return, 97 99 unsigned char **prop_return); 98 int XGetWindowProperty(Display *display, Window w, Atom property, 99 long long_offset, long long_length, Bool delProp, 100 Atom req_type, Atom *actual_type_return, 101 int *actual_format_return, 102 unsigned long *nitems_return, 103 unsigned long *bytes_after_return, 104 unsigned char **prop_return) 105 { 100 int XGetWindowProperty(Display *display, Window w, Atom property, 101 long long_offset, long long_length, Bool delProp, 102 Atom req_type, Atom *actual_type_return, 103 int *actual_format_return, 104 unsigned long *nitems_return, 105 unsigned long *bytes_after_return, 106 unsigned char **prop_return) 107 { 108 RT_NOREF2(display, long_length); 106 109 Assert(display == TEST_DISPLAY); 107 110 Atom atomType = XInternAtom (display, WM_TYPE_PROP, true); … … 130 133 } 131 134 135 #if 0 /* unused */ 132 136 /** Sets the current set of properties for all mock X11 windows */ 133 137 static void smlsSetDesktopWindow(Window hWin) … … 135 139 g_hSmlsDesktopWindow = hWin; 136 140 } 137 138 extern "C" Bool XShapeQueryExtension (Display *dpy, int *event_basep, 139 int *error_basep); 140 Bool XShapeQueryExtension (Display *dpy, int *event_basep, int *error_basep) 141 { 141 #endif 142 143 extern "C" Bool XShapeQueryExtension(Display *dpy, int *event_basep, int *error_basep); 144 Bool XShapeQueryExtension(Display *dpy, int *event_basep, int *error_basep) 145 { 146 RT_NOREF3(dpy, event_basep, error_basep); 142 147 Assert(dpy == TEST_DISPLAY); 143 148 return true; … … 146 151 /* We silently ignore this for now. */ 147 152 extern "C" int XSelectInput(Display *display, Window w, long event_mask); 148 int XSelectInput(Display *display, Window w, long event_mask) 149 { 153 int XSelectInput(Display *display, Window w, long event_mask) 154 { 155 RT_NOREF3(display, w, event_mask); 150 156 Assert(display == TEST_DISPLAY); 151 157 return 0; … … 153 159 154 160 /* We silently ignore this for now. */ 155 extern "C" void XShapeSelectInput(Display *display, Window w, 156 unsigned long event_mask); 157 void XShapeSelectInput(Display *display, Window w, unsigned long event_mask) 158 { 161 extern "C" void XShapeSelectInput(Display *display, Window w, unsigned long event_mask); 162 void XShapeSelectInput(Display *display, Window w, unsigned long event_mask) 163 { 164 RT_NOREF3(display, w, event_mask); 159 165 Assert(display == TEST_DISPLAY); 160 166 } … … 163 169 Window XDefaultRootWindow(Display *display) 164 170 { 171 RT_NOREF1(display); 165 172 Assert(display == TEST_DISPLAY); 166 173 return TEST_ROOT; … … 179 186 unsigned int *nchildren_return) 180 187 { 188 RT_NOREF1(display); 181 189 Assert(display == TEST_DISPLAY); 182 190 AssertReturn(w == TEST_ROOT, False); /* We support nothing else */ … … 197 205 Window XmuClientWindow(Display *dpy, Window win) 198 206 { 207 RT_NOREF1(dpy); 199 208 Assert(dpy == TEST_DISPLAY); 200 209 return win; … … 206 215 XWindowAttributes *window_attributes_return) 207 216 { 217 RT_NOREF1(display); 208 218 Assert(display == TEST_DISPLAY); 209 219 AssertPtrReturn(window_attributes_return, 1); … … 224 234 XSizeHints *hints_return, long *supplied_return) 225 235 { 236 RT_NOREF4(display, w, hints_return, supplied_return); 226 237 Assert(display == TEST_DISPLAY); 227 238 return 1; … … 248 259 int *count, int *ordering) 249 260 { 261 RT_NOREF2(dpy, kind); 250 262 Assert(dpy == TEST_DISPLAY); 251 263 if ((window != g_SmlsShapedWindow) || (window == 0)) … … 273 285 int XNextEvent(Display *display, XEvent *event_return) 274 286 { 287 RT_NOREF1(display); 275 288 Assert(display == TEST_DISPLAY); 276 289 event_return->xany.type = g_SmlsEventType; … … 292 305 long event_mask, XEvent *event_send) 293 306 { 307 RT_NOREF5(display, w, propagate, event_mask, event_send); 294 308 Assert(display == TEST_DISPLAY); 295 309 AssertFailedReturn(0); … … 300 314 int XFlush(Display *display) 301 315 { 316 RT_NOREF1(display); 302 317 Assert(display == TEST_DISPLAY); 303 318 AssertFailedReturn(0); … … 310 325 static void sendRegionUpdate(RTRECT *pRects, size_t cRects) 311 326 { 327 RT_NOREF2(pRects, cRects); 312 328 g_fNotified = true; 313 329 }
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器