All pastes #544571 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-06 14:31 UTC
rendered paste body
#include <stdio.h>

#include <X11/Xlib.h>
#include <X11/Xlibint.h>
#include <X11/Xproto.h>
#include <X11/Xatom.h>
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/Xrender.h>

#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <math.h>

int main(int argc, char *argv[])
{	
	char* display_name = ":0.0";
	int screen = 0;
	
	Display *dpy = XOpenDisplay(display_name);
	Window root = RootWindow (dpy, screen);
	
	/*XRRScreenResources *sr = XRRGetScreenResources ( dpy, root );
	XRROutputInfo *output = XRRGetOutputInfo(dpy, sr, sr->outputs[0]);*/
	
	int maj, min;
	XRRQueryVersion ( dpy, &maj, &min );
	
	printf("\nRandR Version: %d.%d \n", maj, min);
		
	return 0;
}