mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-04-12 08:21:28 -04:00
Support running on a specified KMS connector
This commit is contained in:
parent
b559fcbf72
commit
f5878facf3
1 changed files with 6 additions and 1 deletions
|
|
@ -161,10 +161,13 @@ struct wlsc_surface {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *option_background = "background.jpg";
|
static const char *option_background = "background.jpg";
|
||||||
|
static int option_connector = 0;
|
||||||
|
|
||||||
static const GOptionEntry option_entries[] = {
|
static const GOptionEntry option_entries[] = {
|
||||||
{ "background", 'b', 0, G_OPTION_ARG_STRING,
|
{ "background", 'b', 0, G_OPTION_ARG_STRING,
|
||||||
&option_background, "Background image" },
|
&option_background, "Background image" },
|
||||||
|
{ "connector", 'c', 0, G_OPTION_ARG_INT,
|
||||||
|
&option_connector, "KMS connector" },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1178,7 +1181,9 @@ create_output(struct wlsc_compositor *ec, struct udev_device *device)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (connector->connection == DRM_MODE_CONNECTED &&
|
if (connector->connection == DRM_MODE_CONNECTED &&
|
||||||
connector->count_modes > 0)
|
connector->count_modes > 0 &&
|
||||||
|
(option_connector == 0 ||
|
||||||
|
connector->connector_id == option_connector))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
drmModeFreeConnector(connector);
|
drmModeFreeConnector(connector);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue