dix: add getter for display name

Xrdp needs to know the current display name (for setting up it's
own server sockets accordingly). Instead of exporting an internal
field, adding a little getter for this.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1783>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-02-11 19:08:30 +01:00
parent 80a3df55ae
commit 2e0c19b6d9
4 changed files with 31 additions and 2 deletions

19
dix/display.c Normal file
View File

@@ -0,0 +1,19 @@
/* SPDX-License-Identifier: MIT OR X11
*
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
*/
#include <dix-config.h>
#include "dix/dix_priv.h"
#include "include/dix.h"
#include "include/screenint.h"
const char *display = "0";
int displayfd = -1;
const char *dixGetDisplayName(ScreenPtr *pScreen)
{
// pScreen currently is ignored as the value is global,
// but this might perhaps change in the future.
return display;
}