Created
April 22, 2017 22:26
-
-
Save PuercoPop/7cbcd861af1bfc8f5c5dc0a6dfc25fb2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; (ql:quickload :clx) | |
(destructuring-bind (hostname display-id screen-id protocol) | |
(xlib::get-default-display ":1") | |
(let ((display (xlib:open-display hostname :display display-id :protocol protocol))) | |
(xlib/xinerama:xinerama-is-active display))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
// clang -std=c99 -pedantic -Werror -I/usr/include test-xinerama.c -o test-xinerama -lc -lX11 -lXinerama | |
#include <X11/Xlib.h> | |
#include <X11/extensions/Xinerama.h> | |
static Display *dpy; | |
int | |
main(int argc, char *argv[]) | |
{ | |
dpy = XOpenDisplay(":1"); | |
if(!dpy) perror("Unable to open display.\n"); | |
bool xineramap; | |
xineramap = XineramaIsActive(dpy); | |
printf("Xinemara is active? %d\n", xineramap); | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment