WIP: rootless mode
2do: input not working yet
properties (eg. window name aren't set)
connection closes when window closed
This commit is contained in:
parent
00da0f625f
commit
6c9ef7905a
|
|
@ -46,6 +46,7 @@ char *xnestWindowName = NULL;
|
|||
int xnestNumScreens = 0;
|
||||
Bool xnestDoDirectColormaps = FALSE;
|
||||
xcb_window_t xnestParentWindow = 0;
|
||||
Bool xnestRootless = FALSE;
|
||||
|
||||
int
|
||||
ddxProcessArgument(int argc, char *argv[], int i)
|
||||
|
|
@ -63,6 +64,11 @@ ddxProcessArgument(int argc, char *argv[], int i)
|
|||
noDPMSExtension = TRUE;
|
||||
#endif
|
||||
|
||||
if (!strcmp(argv[i], "-rootless")) {
|
||||
xnestRootless = TRUE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!strcmp(argv[i], "-display")) {
|
||||
if (++i < argc) {
|
||||
xnestDisplayName = argv[i];
|
||||
|
|
@ -182,6 +188,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
|
|||
void
|
||||
ddxUseMsg(void)
|
||||
{
|
||||
ErrorF("-rootless enable rootless mode\n");
|
||||
ErrorF("-display string display name of the real server\n");
|
||||
ErrorF("-full utilize full regeneration\n");
|
||||
ErrorF("-class string default visual class\n");
|
||||
|
|
|
|||
|
|
@ -35,5 +35,6 @@ extern char *xnestWindowName;
|
|||
extern int xnestNumScreens;
|
||||
extern Bool xnestDoDirectColormaps;
|
||||
extern xcb_window_t xnestParentWindow;
|
||||
extern Bool xnestRootless;
|
||||
|
||||
#endif /* XNESTARGS_H */
|
||||
|
|
|
|||
|
|
@ -49,6 +49,9 @@ DevPrivateKeyRec xnestWindowPrivateKeyRec;
|
|||
*/
|
||||
static inline xcb_window_t xnest_upstream_window_parent(WindowPtr pWin)
|
||||
{
|
||||
if (xnestRootless && pWin->parent && !pWin->parent->parent)
|
||||
return xnestUpstreamInfo.screenInfo->root;
|
||||
|
||||
return (pWin->parent ?
|
||||
xnestWindow(pWin->parent) :
|
||||
xnest_screen_priv(pWin->drawable.pScreen)->upstream_frame_window);
|
||||
|
|
|
|||
Loading…
Reference in New Issue