DMXChangeD...Attributes(3)

πŸ“¦
version 1.1.5 Β· 2 versions
, in epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– DMXChangeDesktopAttributes β€” like, the whole vibe of your global bounding box, bestie πŸ’–

okay so this is a page from Library Functions Manual β€” it's DMXChangeD...Attributes(3), and yes the name is long enough to need its own group chat. sit down, grab a strawberry πŸ“, and let me tell you about the one function that resizes the bounding box of your entire screen.


✨ NAME ✨

DMXChangeDesktopAttributes β€” change global bounding box. that's it. that's the whole job. iconic behavior honestly πŸ‘‘


🌸 SYNOPSIS 🌸

#include <X11/extensions/dmxext.h>

int DMXChangeDesktopAttributes(Display *dpy,
                               unsigned int mask,
                               DMXDesktopAttributes *attr);

look at her. three arguments, zero drama. we love a low-maintenance function signature πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, bestie: DMXChangeDesktopAttributes() resizes the bounding box of the whole screen β€” but only when you're using the Xinerama extension. if you're not? it literally does nothing to your screen layout. not a single pixel moved. it's giving "I showed up but I'm not participating" 😭

the attributes you wanna change? those go in attr. and you tell it which attributes you care about using mask. two separate little slots, very organized of her.

the values you use to compute mask are these four queens:

  • DMXDesktopWidth
  • DMXDesktopHeight
  • DMXDesktopShiftX
  • DMXDesktopShiftY

and here's the DMXDesktopAttributes structure, in all her glory:

typedef struct {
    unsigned int width;
    unsigned int height;
    int          shiftX;
    int          shiftY;
} DMXDesktopAttributes;

okay so let's break it down, no cap:

  • width and height β€” these specify the new width and height for the bounding box. glow-up time ✨
  • shiftX and shiftY β€” these specify where the Xinerama origin will be placed with respect to the origin of the new bounding box. this is the sneaky-genius part: it lets you move the left and upper edges of the bounding box without changing the visual position of the windows on the desktop. windows stay put, the box moves. it's giving main character energy that refuses to lose her spot 🫢

now the defaults, because bestie needs to know what happens when you say nothing:

  • if width or height is not specified, the current values will be used.
  • if shiftX or shiftY is not specified, 0 will be used.
heads up fr fr: all coordinates are in the global DMX coordinate system. and if Xinerama is not active, an error will be generated. so like, vibe check your Xinerama status first, okay? πŸ™ˆ

πŸ’€ RETURN VALUE πŸ’€

DMXChangeDesktopAttributes() will return 0 on success β€” slay, we love a zero πŸŽ€

but if it's not feeling it, you might get:

  • DmxBadXinerama β€” Xinerama is not active. she can't work under these conditions.
  • DmxBadValue β€” the size of the bounding box is too large. bestie, that's too much box.
  • DmxBadReply β€” there was a protocol error. awkward.

also, DMXChangeDesktopAttributes() can generate:

  • BadLength β€” if the request is malformed, which should never happen when using this library interface. so if you see this one, something has gone deeply wrong and it's not your fault, periodt.
  • BadValue β€” if any values are out of range.

🌈 SEE ALSO 🌈

go read her sisters, they're all iconic:


that's the whole page, bestie β€” you ate this one, honestly πŸ‘‘

later, babes: this was X Version 11, libdmx 1.1.5, filed under DMXChangeD...Attributes(3). mwah πŸ’–βœ¨πŸŒΈ