diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/kdrive/ephyr/Xephyr.man.pre | 5 | ||||
-rw-r--r-- | hw/kdrive/ephyr/ephyrinit.c | 16 |
2 files changed, 20 insertions, 1 deletions
diff --git a/hw/kdrive/ephyr/Xephyr.man.pre b/hw/kdrive/ephyr/Xephyr.man.pre index 7f0e811a2..34a2971b2 100644 --- a/hw/kdrive/ephyr/Xephyr.man.pre +++ b/hw/kdrive/ephyr/Xephyr.man.pre @@ -46,6 +46,11 @@ sets the screen size. .BI -parent " id" uses exiting window .I id . +If a +.BI -screen +argument follows a +.BI -parent +argument, this screen is embedded into the given window. .TP 8 .B -host-cursor set 'cursor acceleration': diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index 1399d7aaa..d20f9b662 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -147,6 +147,7 @@ processScreenArg (char *screen_size, char *parent_id) int ddxProcessArgument (int argc, char **argv, int i) { + static char* parent = NULL; EPHYR_DBG("mark argv[%d]='%s'", i, argv[i] ); if (i == 1) @@ -158,6 +159,18 @@ ddxProcessArgument (int argc, char **argv, int i) { if(i+1 < argc) { + int j; + /* If parent is specified and a screen argument follows, don't do + * anything, let the -screen handling init the rest */ + for (j = i; j < argc; j++) + { + if (!strcmp(argv[j], "-screen")) + { + parent = argv[i + 1]; + return 2; + } + } + processScreenArg ("100x100", argv[i+1]); return 2; } @@ -169,7 +182,8 @@ ddxProcessArgument (int argc, char **argv, int i) { if ((i+1) < argc) { - processScreenArg (argv[i+1], NULL); + processScreenArg (argv[i+1], parent); + parent = NULL; return 2; } |