---
name: "DMXChangeScreensAttributes"
section: "3"
platform: "linux"
package: "libdmx-dev"
version: "1:1.1.4-2"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/DMXChangeScreensAttributes"
---

# DMXChangeScreensAttributes(3)

change back-end screen attributes

## NAME

DMXChangeScreensAttributes - change back-end screen attributes

## SYNOPSIS

**#include \<X11/extensions/dmxext.h\>**

```
int DMXChangeScreensAttributes(Display *dpy,
                               int screen_count,
                               int *screens,
                               int mask_count,
                               unsigned int *masks,
                               DMXScreenAttributes *attr,
                               int *error_screen);
```

## DESCRIPTION

**DMXChangeScreensAttributes()** changes the geometries and positions of the DMX screen and DMX root windows on the back-end X servers. *screen\_count* specifies the number of screens to be changed.  For each screen, the screen number is placed in *screens*, an attribute mask is placed in *masks*, and a *DMXScreenAttributes* structure is included in *attr*.

An explanation of the *DMXScreenAttributes* structure is given in [**DMXGetScreenAttributes**(3)](/DMXGetScreenAttributes/3.md).

The values that are used to compute each value in *masks* are as follows

```
DMXScreenWindowWidth
DMXScreenWindowHeight
DMXScreenWindowXoffset
DMXScreenWindowYoffset
DMXRootWindowWidth
DMXRootWindowHeight
DMXRootWindowXoffset
DMXRootWindowYoffset
DMXRootWindowXorigin
DMXRootWindowYorigin
```

In general, *mask\_count* should be equal to *screen\_count*. However, as a convenience, *mask\_count* may be less than *screen\_count*, and the last entry in *masks* will then be used for all of the remaining screens.  For example, this allows identical changes to be made to several screens using only one mask.

## RETURN VALUE

On success, 0 is returned.  Otherwise, *error\_screen* is set to the value of the first screen in the list that caused the error and a non-zero value is returned.  If *screen\_count* or *mask\_count* is less than 1, or if any of the attribute values are not within the appropriate bounding boxes, **DmxBadValue** is returned.  If a protocol error occurs, **DmxBadReply** is returned.

**DMXChangeScreensAttributes()** can generate **BadLength** (if the data provided does not match the data implicitly required by the *screen\_count* and *mask\_count* values), **BadValue** (if the values in *screens* are not valid), and **BadAlloc** errors.

## SEE ALSO

[**DMXGetScreenCount**(3)](/DMXGetScreenCount/3.md),  [**DMXGetScreenAttributes**(3)](/DMXGetScreenAttributes/3.md),  [**DMX**(3)](/DMX/3.md), [**Xdmx**(1)](/Xdmx/1.md)
