mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 01:48:02 +02:00
Add virtualFb screen parameter.
This commit is contained in:
parent
63a2f0cbfd
commit
cbfbee6bf4
6 changed files with 28 additions and 18 deletions
|
|
@ -61,9 +61,7 @@ static char *dmxXkbOptions;
|
|||
/** Stores lists of configuration information. */
|
||||
typedef struct DMXConfigListStruct {
|
||||
const char *name;
|
||||
const char *display;
|
||||
const char *v0, *v1;
|
||||
int v2;
|
||||
DevUnion value[8];
|
||||
struct DMXConfigListStruct *next;
|
||||
} DMXConfigList, *DMXConfigListPtr;
|
||||
|
||||
|
|
@ -89,15 +87,17 @@ void dmxConfigStoreDisplay(const char *name,
|
|||
const char *display,
|
||||
const char *authType,
|
||||
const char *authData,
|
||||
int authDataLen)
|
||||
int authDataLen,
|
||||
int virtualFb)
|
||||
{
|
||||
DMXConfigListPtr entry = malloc(sizeof(*entry));
|
||||
|
||||
entry->name = strdup (name);
|
||||
entry->display = strdup (display);
|
||||
entry->v0 = authType ? strdup (authType) : NULL;
|
||||
entry->v1 = dmxAuthDataCopy (authData, authDataLen);
|
||||
entry->v2 = authDataLen;
|
||||
entry->value[0].ptr = strdup (display);
|
||||
entry->value[1].ptr = authType ? strdup (authType) : NULL;
|
||||
entry->value[2].ptr = dmxAuthDataCopy (authData, authDataLen);
|
||||
entry->value[3].val = authDataLen;
|
||||
entry->value[4].val = virtualFb;
|
||||
entry->next = NULL;
|
||||
if (!dmxConfigCmd.displays) dmxConfigCmd.displays = entry;
|
||||
else {
|
||||
|
|
@ -196,6 +196,7 @@ static DMXScreenInfo *dmxConfigAddDisplay(const char *name,
|
|||
const char *authType,
|
||||
const char *authData,
|
||||
int authDataLen,
|
||||
int virtualFb,
|
||||
int scrnWidth, int scrnHeight,
|
||||
int scrnX, int scrnY,
|
||||
int scrnXSign, int scrnYSign,
|
||||
|
|
@ -230,6 +231,7 @@ static DMXScreenInfo *dmxConfigAddDisplay(const char *name,
|
|||
dmxScreen->authType = authType ? strdup (authType) : NULL;
|
||||
dmxScreen->authData = dmxAuthDataCopy (authData, authDataLen);
|
||||
dmxScreen->authDataLen = authDataLen;
|
||||
dmxScreen->virtualFb = virtualFb;
|
||||
++dmxNumScreens;
|
||||
return dmxScreen;
|
||||
}
|
||||
|
|
@ -261,7 +263,7 @@ static void dmxConfigCopyFromDisplay(DMXConfigDisplayPtr d)
|
|||
|
||||
dmxScreen = dmxConfigAddDisplay(d->name,
|
||||
d->name,
|
||||
NULL, NULL, 0,
|
||||
NULL, NULL, 0, 0,
|
||||
d->scrnWidth, d->scrnHeight,
|
||||
d->scrnX, d->scrnY,
|
||||
d->scrnXSign, d->scrnYSign,
|
||||
|
|
@ -287,7 +289,8 @@ static void dmxConfigCopyFromWall(DMXConfigWallPtr w)
|
|||
}
|
||||
|
||||
for (pt = w->nameList; pt; pt = pt->next) {
|
||||
dmxScreen = dmxConfigAddDisplay(pt->string, pt->string, NULL, NULL, 0,
|
||||
dmxScreen = dmxConfigAddDisplay(pt->string, pt->string,
|
||||
NULL, NULL, 0, 0,
|
||||
w->width, w->height,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
if (pt == w->nameList) { /* Upper left */
|
||||
|
|
@ -394,10 +397,11 @@ static void dmxConfigFromCommandLine(void)
|
|||
dmxLog(dmxInfo, "Using configuration from command line\n");
|
||||
for (pt = dmxConfigCmd.displays; pt; pt = pt->next) {
|
||||
DMXScreenInfo *dmxScreen = dmxConfigAddDisplay(pt->name,
|
||||
pt->display,
|
||||
pt->v0,
|
||||
pt->v1,
|
||||
pt->v2,
|
||||
pt->value[0].ptr,
|
||||
pt->value[1].ptr,
|
||||
pt->value[2].ptr,
|
||||
pt->value[3].val,
|
||||
pt->value[4].val,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0);
|
||||
if (dmxNumScreens == 1) {
|
||||
|
|
@ -423,7 +427,8 @@ static void dmxConfigFromCommandLine(void)
|
|||
|
||||
while (dmxNumDetached--)
|
||||
{
|
||||
DMXScreenInfo *dmxScreen = dmxConfigAddDisplay ("", "", NULL, NULL, 0,
|
||||
DMXScreenInfo *dmxScreen = dmxConfigAddDisplay ("", "",
|
||||
NULL, NULL, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0);
|
||||
dmxScreen->where = PosAbsolute;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ extern void dmxConfigStoreDisplay(const char *name,
|
|||
const char *display,
|
||||
const char *authType,
|
||||
const char *authData,
|
||||
int authDataLen);
|
||||
int authDataLen,
|
||||
int virtualFb);
|
||||
extern void dmxConfigStoreNumDetached(const char *num);
|
||||
extern void dmxConfigStoreInput(const char *input); /* Core devices */
|
||||
extern void dmxConfigStoreXInput(const char *input); /* Non-core devices */
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@ typedef struct _DMXScreenInfo {
|
|||
int authDataLen;
|
||||
|
||||
int beUseRoot;
|
||||
int virtualFb;
|
||||
|
||||
/*---------- Screen window information ----------*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1810,6 +1810,7 @@ dmxAttachScreen (int idx,
|
|||
oldDMXScreen = *dmxScreen;
|
||||
|
||||
dmxScreen->beUseRoot = useRoot;
|
||||
dmxScreen->virtualFb = FALSE;
|
||||
|
||||
/* Copy the display name to the new screen */
|
||||
dmxScreen->display = strdup(attr->displayName);
|
||||
|
|
|
|||
|
|
@ -1037,7 +1037,8 @@ int ddxProcessArgument(int argc, char *argv[], int i)
|
|||
}
|
||||
|
||||
if (!strcmp(argv[i], "-display")) {
|
||||
if (++i < argc) dmxConfigStoreDisplay(argv[i], argv[i], NULL, NULL, 0);
|
||||
if (++i < argc) dmxConfigStoreDisplay(argv[i], argv[i],
|
||||
NULL, NULL, 0, 0);
|
||||
retval = 2;
|
||||
} else if (!strcmp(argv[i], "-numDetached")) {
|
||||
if (++i < argc) dmxConfigStoreNumDetached(argv[i]);
|
||||
|
|
|
|||
|
|
@ -259,7 +259,8 @@ dmxSetupAuth (char *name, int authFd)
|
|||
xbeDisplay,
|
||||
auth.name,
|
||||
auth.data,
|
||||
auth.data_length);
|
||||
auth.data_length,
|
||||
0);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue