xwayland: Use the output serial for the fixed output
The fixed output is called "XWAYLAND0", yet if the compositor does not support Wayland output names, the "real" output names may collide with the fixed output name. Use the same output serial as with the (default) real output names to avoid reusing the same names. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Acked-by: Michel Dänzer <mdaenzer@redhat.com>
This commit is contained in:
parent
a6bbc9663d
commit
f0124485e1
|
@ -1174,6 +1174,7 @@ Bool
|
|||
xwl_screen_init_randr_fixed(struct xwl_screen *xwl_screen)
|
||||
{
|
||||
struct xwl_output *xwl_output;
|
||||
char name[MAX_OUTPUT_NAME] = { 0 };
|
||||
rrScrPrivPtr rp;
|
||||
RRModePtr mode;
|
||||
|
||||
|
@ -1192,7 +1193,10 @@ xwl_screen_init_randr_fixed(struct xwl_screen *xwl_screen)
|
|||
rp->rrGetInfo = xwl_randr_get_info;
|
||||
rp->rrSetConfig = xwl_randr_set_config_fixed;
|
||||
|
||||
xwl_output->randr_output = RROutputCreate(xwl_screen->screen, "XWAYLAND0", 9, NULL);
|
||||
snprintf(name, MAX_OUTPUT_NAME, "XWAYLAND%d",
|
||||
xwl_screen_get_next_output_serial(xwl_screen));
|
||||
xwl_output->randr_output = RROutputCreate(xwl_screen->screen, name,
|
||||
strlen(name), NULL);
|
||||
if (!xwl_output->randr_output) {
|
||||
ErrorF("Failed to create RandR output\n");
|
||||
goto err;
|
||||
|
|
Loading…
Reference in New Issue