/* Author: Josh Holtrop * DornerWorks screensaver */ #include #include "displayinfo.h" #include void getDisplaySize(int * width, int * height) { Display * display; if ((display = XOpenDisplay(NULL)) == NULL) { /* fall back on hard-coded defaults */ *width = 1600; *height = 1200; } else { int screen_num = DefaultScreen(display); *width = DisplayWidth(display, screen_num); *height = DisplayHeight(display, screen_num); } } int getNumMonitors() { return 1; }