- Timestamp:
- Apr 16, 2009 1:15:52 PM (16 years ago)
- Location:
- trunk/src/VBox/Additions/x11/VBoxClient
- Files:
-
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/autoresize.cpp
r18360 r18938 27 27 #include <errno.h> 28 28 29 #include <X11/Xlib.h> 30 31 #include <iprt/assert.h> 32 #include <iprt/thread.h> 29 33 #include <VBox/log.h> 30 34 #include <VBox/VBoxGuest.h> 31 #include <iprt/assert.h>32 #include <iprt/thread.h>33 35 34 36 #include "VBoxClient.h" … … 73 75 { 74 76 LogFlowFunc(("\n")); 77 /* Keep an open display so that we terminate if X11 does. */ 78 Display *pDisplay = XOpenDisplay(NULL); 75 79 uint32_t cx0 = 0, cy0 = 0, cBits0 = 0, iDisplay0 = 0; 76 80 int rc = VbglR3GetLastDisplayChangeRequest(&cx0, &cy0, &cBits0, &iDisplay0); … … 79 83 uint32_t cx = 0, cy = 0, cBits = 0, iDisplay = 0; 80 84 rc = VbglR3DisplayChangeWaitEvent(&cx, &cy, &cBits, &iDisplay); 85 /* Make sure we are still connected to X. If the X server has 86 * terminated then we should get a resize event above. */ 87 XPending(pDisplay); 81 88 /* Ignore the request if it is stale */ 82 89 if ((cx != cx0) || (cy != cy0)) … … 93 100 cy0 = 0; 94 101 } 102 XCloseDisplay(pDisplay); 95 103 LogFlowFunc(("returning VINF_SUCCESS\n")); 96 104 return VINF_SUCCESS; -
trunk/src/VBox/Additions/x11/VBoxClient/main.cpp
r18360 r18938 29 29 #include <signal.h> 30 30 31 #include <X11/Xlib.h> 32 31 33 #include <iprt/env.h> 32 34 #include <iprt/initterm.h> … … 38 40 39 41 #include "VBoxClient.h" 40 41 #ifdef DYNAMIC_RESIZE42 # include "displaychange.h"43 # ifdef SEAMLESS_GUEST44 # include "seamless.h"45 # endif46 #endif47 42 48 43 #define TRACE RTPrintf("%s: %d\n", __PRETTY_FUNCTION__, __LINE__); Log(("%s: %d\n", __PRETTY_FUNCTION__, __LINE__)) -
trunk/src/VBox/Additions/x11/VBoxClient/seamless.cpp
r18360 r18938 45 45 } 46 46 mSeamless.init(); 47 pause(); 47 /* Stay running as long as X does... */ 48 Display *pDisplay = XOpenDisplay(NULL); 49 XEvent ev; 50 while (true) 51 XNextEvent(pDisplay, &ev); 48 52 return VERR_INTERRUPTED; 49 53 }
Note:
See TracChangeset
for help on using the changeset viewer.