aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/ephyr/ephyrinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/kdrive/ephyr/ephyrinit.c')
-rwxr-xr-x[-rw-r--r--]xorg-server/hw/kdrive/ephyr/ephyrinit.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrinit.c b/xorg-server/hw/kdrive/ephyr/ephyrinit.c
index 8fe45d575..dee15b530 100644..100755
--- a/xorg-server/hw/kdrive/ephyr/ephyrinit.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrinit.c
@@ -47,6 +47,8 @@ extern KdPointerDriver LinuxEvdevMouseDriver;
extern KdKeyboardDriver LinuxEvdevKeyboardDriver;
#endif
+void processScreenOrOutputArg(const char *screen_size, const char *output, char *parent_id);
+void processOutputArg(const char *output, char *parent_id);
void processScreenArg(const char *screen_size, char *parent_id);
void
@@ -135,6 +137,7 @@ ddxUseMsg(void)
ErrorF("-parent <XID> Use existing window as Xephyr root win\n");
ErrorF("-sw-cursor Render cursors in software in Xephyr\n");
ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n");
+ ErrorF("-output <NAME> Attempt to run Xephyr fullscreen (restricted to given output geometry)\n");
ErrorF("-grayscale Simulate 8bit grayscale\n");
ErrorF("-resizeable Make Xephyr windows resizeable\n");
#ifdef GLAMOR
@@ -156,7 +159,7 @@ ddxUseMsg(void)
#endif
void
-processScreenArg(const char *screen_size, char *parent_id)
+processScreenOrOutputArg(const char *screen_size, const char *output, char *parent_id)
{
KdCardInfo *card;
@@ -166,6 +169,7 @@ processScreenArg(const char *screen_size, char *parent_id)
if (card) {
KdScreenInfo *screen;
unsigned long p_id = 0;
+ Bool use_geometry;
screen = KdScreenInfoAdd(card);
KdParseScreen(screen, screen_size);
@@ -176,14 +180,28 @@ processScreenArg(const char *screen_size, char *parent_id)
if (parent_id) {
p_id = strtol(parent_id, NULL, 0);
}
+
+ use_geometry = (strchr(screen_size, '+') != NULL);
EPHYR_DBG("screen number:%d\n", screen->mynum);
- hostx_add_screen(screen, p_id, screen->mynum);
+ hostx_add_screen(screen, p_id, screen->mynum, use_geometry, output);
}
else {
ErrorF("No matching card found!\n");
}
}
+void
+processScreenArg(const char *screen_size, char *parent_id)
+{
+ processScreenOrOutputArg(screen_size, NULL, parent_id);
+}
+
+void
+processOutputArg(const char *output, char *parent_id)
+{
+ processScreenOrOutputArg("100x100+0+0", output, parent_id);
+}
+
#ifndef _MSC_VER
int
ddxProcessArgument(int argc, char **argv, int i)
@@ -226,6 +244,15 @@ ddxProcessArgument(int argc, char **argv, int i)
UseMsg();
exit(1);
}
+ else if (!strcmp(argv[i], "-output")) {
+ if (i + 1 < argc) {
+ processOutputArg(argv[i + 1], NULL);
+ return 2;
+ }
+
+ UseMsg();
+ exit(1);
+ }
else if (!strcmp(argv[i], "-sw-cursor")) {
hostx_use_sw_cursor();
return 1;