summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/kdrive/ephyr/Xephyr.man.pre5
-rw-r--r--hw/kdrive/ephyr/ephyrinit.c16
2 files changed, 20 insertions, 1 deletions
diff --git a/hw/kdrive/ephyr/Xephyr.man.pre b/hw/kdrive/ephyr/Xephyr.man.pre
index 008256914..eb80b96b0 100644
--- a/hw/kdrive/ephyr/Xephyr.man.pre
+++ b/hw/kdrive/ephyr/Xephyr.man.pre
@@ -48,2 +48,7 @@ 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
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 22152ffe0..eecad7e42 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -150,2 +150,3 @@ ddxProcessArgument (int argc, char **argv, int i)
{
+ static char* parent = NULL;
EPHYR_DBG("mark argv[%d]='%s'", i, argv[i] );
@@ -161,2 +162,14 @@ ddxProcessArgument (int argc, char **argv, int i)
{
+ 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]);
@@ -172,3 +185,4 @@ ddxProcessArgument (int argc, char **argv, int i)
{
- processScreenArg (argv[i+1], NULL);
+ processScreenArg (argv[i+1], parent);
+ parent = NULL;
return 2;