#include #include #include #include #include #include #include #include #include #include int main(void) { int size = -1; int rotation = 1; int screen = -1; char *display_name = NULL; Display *dpy; Window root; XRRScreenConfiguration *sc; Rotation current_rotation; dpy = XOpenDisplay (display_name); screen = DefaultScreen (dpy); root = RootWindow (dpy, screen); sc = XRRGetScreenInfo (dpy, root); if (sc == NULL) exit (1); size = XRRConfigCurrentConfiguration (sc, ¤t_rotation); XRRSetScreenConfig(dpy, sc, DefaultRootWindow(dpy), (SizeID) size, (Rotation) rotation, CurrentTime); return 0; }