- Timestamp:
- Oct 26, 2009 12:38:01 PM (15 years ago)
- Location:
- trunk/src/VBox/Additions/x11/VBoxClient
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/VBoxClient.h
r23859 r24069 36 36 virtual const char *getPidFilePath() = 0; 37 37 /** Run the service main loop */ 38 virtual int run( ) = 0;38 virtual int run(bool fDaemonised = false) = 0; 39 39 /** Clean up any global resources before we shut down hard */ 40 40 virtual void cleanup() = 0; -
trunk/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
r21651 r24069 290 290 return ".vboxclient-clipboard.pid"; 291 291 } 292 virtual int run( )292 virtual int run(bool fDaemonised /* = false */) 293 293 { 294 294 int rc = vboxClipboardConnect(); -
trunk/src/VBox/Additions/x11/VBoxClient/display.cpp
r22706 r24069 104 104 while (true) 105 105 XNextEvent(pDisplay, &ev); 106 return 0; 106 107 } 107 108 … … 178 179 return ".vboxclient-display.pid"; 179 180 } 180 virtual int run( )181 virtual int run(bool fDaemonised /* = false */) 181 182 { 182 183 int rc = initDisplay(); -
trunk/src/VBox/Additions/x11/VBoxClient/hostversion.cpp
r23949 r24069 23 23 #include <iprt/ldr.h> 24 24 #include <iprt/string.h> 25 #include <iprt/thread.h> 25 26 26 27 #ifdef VBOX_WITH_DBUS … … 62 63 if (conn == NULL) 63 64 { 64 Log Flow(("Could not create D-BUS message!\n"));65 Log(("Could not create D-BUS message!\n")); 65 66 rc = VERR_INVALID_HANDLE; 66 67 } … … 98 99 dbus_message_iter_append_basic(&iter,DBUS_TYPE_INT32,&msg_timeout); 99 100 100 /* @todo Send with waiting for a reply! */101 if (dbus_connection_send(conn, msg, NULL))101 DBusError err; 102 dbus_connection_send_with_reply_and_block(conn, msg, 30 * 1000, &err); 102 103 dbus_connection_flush(conn); 103 104 } … … 113 114 /** @todo Move this part in VbglR3 and just provide a callback for the platform-specific 114 115 notification stuff, since this is very similar to the VBoxTray code. */ 115 virtual int run( )116 virtual int run(bool fDaemonised /* = false */) 116 117 { 117 118 int rc; 118 119 LogFlowFunc(("\n")); 120 121 /* Because we need desktop notifications to be displayed, wait 122 * some time to make the desktop environment load (as a work around). */ 123 if (fDaemonised) 124 RTThreadSleep(30 * 1000 /* Wait 30 seconds */); 125 119 126 # ifdef VBOX_WITH_DBUS 120 127 rc = RTDBusLoadLib(); … … 131 138 rc = VbglR3GuestPropConnect(&uGuestPropSvcClientID); 132 139 if (RT_FAILURE(rc)) 133 Log Flow(("Cannot connect to guest property service! rc = %Rrc\n", rc));140 Log(("Cannot connect to guest property service! rc = %Rrc\n", rc)); 134 141 } 135 142 … … 154 161 "install option from the Devices menu.", pszGuestVersion, pszHostVersion); 155 162 rc = showNotify(szTitle, szMsg); 163 LogRel(("VBoxClient: VirtualBox Guest Additions update available!")); 156 164 if (RT_FAILURE(rc)) 157 165 Log(("VBoxClient: Could not show version notifier tooltip! rc = %d\n", rc)); -
trunk/src/VBox/Additions/x11/VBoxClient/main.cpp
r23971 r24069 264 264 /* Set an X11 I/O error handler, so that we can shutdown properly on fatal errors. */ 265 265 XSetIOErrorHandler(vboxClientXLibIOErrorHandler); 266 g_pService->run( );266 g_pService->run(fDaemonise); 267 267 VBoxClient::CleanUp(); 268 268 return 1; /* We should never get here. */ -
trunk/src/VBox/Additions/x11/VBoxClient/seamless.cpp
r18938 r24069 36 36 return ".vboxclient-seamless.pid"; 37 37 } 38 virtual int run( )38 virtual int run(bool fDaemonised /* = false */) 39 39 { 40 40 /* Initialise threading in X11 and in Xt. */
Note:
See TracChangeset
for help on using the changeset viewer.