Changeset 6893 in vbox for trunk/src/VBox/Additions/x11
- Timestamp:
- Feb 11, 2008 11:13:53 AM (17 years ago)
- Location:
- trunk/src/VBox/Additions/x11/xclient
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/xclient/seamless-host.h
r6290 r6893 161 161 { 162 162 LogRel(("VBoxService: seamless host object still running! Stopping...\n")); 163 stop(); 163 try 164 { 165 stop(); 166 } 167 catch(...) {} 164 168 } 165 169 } -
trunk/src/VBox/Additions/x11/xclient/seamless-x11.h
r6290 r6893 135 135 Display *mDisplay; 136 136 public: 137 VBoxGuestX11Display(void) { }138 bool init(char *name = 0)137 VBoxGuestX11Display(void) { mDisplay = NULL; } 138 bool init(char *name = NULL) 139 139 { 140 140 mDisplay = XOpenDisplay(name); 141 return ( 0 != mDisplay);141 return (mDisplay != NULL); 142 142 } 143 143 operator Display *() { return mDisplay; } 144 144 Display *get(void) { return mDisplay; } 145 bool isValid(void) { return (0 != mDisplay); } 146 int close(void) { return XCloseDisplay(mDisplay); } 147 ~VBoxGuestX11Display() { close(); } 145 bool isValid(void) { return (mDisplay != NULL); } 146 int close(void) 147 { 148 int rc = XCloseDisplay(mDisplay); 149 mDisplay = NULL; 150 return rc; 151 } 152 ~VBoxGuestX11Display() 153 { 154 if (mDisplay != NULL) 155 close(); 156 } 148 157 }; 149 158 … … 204 213 { 205 214 /* We use post-increment in the operation to prevent the iterator from being invalidated. */ 206 for (iterator it = begin(); it != end(); removeWindow(it++)); 215 try 216 { 217 for (iterator it = begin(); it != end(); removeWindow(it++)); 218 } 219 catch(...) {} 207 220 } 208 221 … … 327 340 } 328 341 329 ~VBoxGuestSeamlessX11() { uninit(); } 342 ~VBoxGuestSeamlessX11() 343 { 344 try 345 { 346 uninit(); 347 } 348 catch(...) {} 349 } 330 350 }; 331 351 -
trunk/src/VBox/Additions/x11/xclient/thread.cpp
r6202 r6893 59 59 { 60 60 LogRelThisFunc(("Warning! Stopping thread %s, as it is still running!\n", mName)); 61 stop(1000, 0); 61 try 62 { 63 stop(1000, 0); 64 } 65 catch(...) {} 62 66 } 63 67 }
Note:
See TracChangeset
for help on using the changeset viewer.