/* See MSDN Section on Multiple Display Monitors: http://msdn.microsoft.com/en-us/library/dd145071 */
+int xf_list_monitors(xfInfo* xfi)
+{
+#ifdef WITH_XINERAMA
+ Display* display;
+ int i, nmonitors = 0;
+ int ignored, ignored2;
+ XineramaScreenInfo* screen = NULL;
+
+ display = XOpenDisplay(NULL);
+
+ if (XineramaQueryExtension(display, &ignored, &ignored2))
+ {
+ if (XineramaIsActive(display))
+ {
+ screen = XineramaQueryScreens(display, &nmonitors);
+
+ for (i = 0; i < nmonitors; i++)
+ {
+ printf(" %s [%d] %dx%d\t+%d+%d\n",
+ (i == 0) ? "*" : " ", i,
+ screen[i].width, screen[i].height,
+ screen[i].x_org, screen[i].y_org);
+ }
+
+ XFree(screen);
+ }
+ }
+
+ XCloseDisplay(display);
+#else
+ Screen* screen;
+ Display* display;
+
+ display = XOpenDisplay(NULL);
+
+ screen = ScreenOfDisplay(display, DefaultScreen(display));
+ printf(" * [0] %dx%d\t+%d+%d\n", WidthOfScreen(screen), HeightOfScreen(screen), 0, 0);
+
+ XCloseDisplay(display);
+#endif
+
+ return 0;
+}
+
BOOL xf_detect_monitors(xfInfo* xfi, rdpSettings* settings)
{
int i;
{ "kbd-subtype", COMMAND_LINE_VALUE_REQUIRED, "<subtype id>", NULL, NULL, -1, NULL, "Keyboard subtype" },
{ "kbd-fn-key", COMMAND_LINE_VALUE_REQUIRED, "<function key count>", NULL, NULL, -1, NULL, "Keyboard function key count" },
{ "admin", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, "console", "Admin (or console) session" },
- { "multimon", COMMAND_LINE_VALUE_OPTIONAL, NULL, NULL, NULL, -1, NULL, "Multi-monitor" },
- { "workarea", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "Work area" },
+ { "multimon", COMMAND_LINE_VALUE_OPTIONAL, NULL, NULL, NULL, -1, NULL, "Use multiple monitors" },
+ { "workarea", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "Use available work area" },
+ { "monitor-list", COMMAND_LINE_VALUE_FLAG | COMMAND_LINE_PRINT, NULL, NULL, NULL, -1, NULL, "List detected monitors" },
{ "t", COMMAND_LINE_VALUE_REQUIRED, "<title>", NULL, NULL, -1, "title", "Window title" },
{ "decorations", COMMAND_LINE_VALUE_BOOL, NULL, NULL, BoolValueTrue, -1, NULL, "Window decorations" },
{ "smart-sizing", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Scale remote desktop to window size" },
printf("\n");
}
+ arg = CommandLineFindArgumentA(args, "monitor-list");
+
+ if (arg->Flags & COMMAND_LINE_VALUE_PRESENT)
+ {
+ settings->ListMonitors = TRUE;
+ }
+
return COMMAND_LINE_STATUS_PRINT;
}
{
settings->Workarea = TRUE;
}
+ CommandLineSwitchCase(arg, "monitor-list")
+ {
+ settings->ListMonitors = TRUE;
+ }
CommandLineSwitchCase(arg, "t")
{
settings->WindowTitle = _strdup(arg->Value);