mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
use DefaultRootWindow.
This commit is contained in:
parent
0ea1c2870f
commit
3ef4c5ce0f
@ -16,7 +16,7 @@ static int XEventError(Display *display, XErrorEvent *event) {
|
|||||||
|
|
||||||
void XEventLoop(char *name) {
|
void XEventLoop(char *name) {
|
||||||
Display *display = XOpenDisplay(name);
|
Display *display = XOpenDisplay(name);
|
||||||
Window root = RootWindow(display, 0);
|
Window root = DefaultRootWindow(display);
|
||||||
|
|
||||||
int xfixes_event_base, xfixes_error_base;
|
int xfixes_event_base, xfixes_error_base;
|
||||||
if (!XFixesQueryExtension(display, &xfixes_event_base, &xfixes_error_base)) {
|
if (!XFixesQueryExtension(display, &xfixes_event_base, &xfixes_error_base)) {
|
||||||
|
@ -231,7 +231,7 @@ void XKey(KeySym keysym, int down) {
|
|||||||
|
|
||||||
Status XSetScreenConfiguration(int width, int height, short rate) {
|
Status XSetScreenConfiguration(int width, int height, short rate) {
|
||||||
Display *display = getXDisplay();
|
Display *display = getXDisplay();
|
||||||
Window root = RootWindow(display, 0);
|
Window root = DefaultRootWindow(display);
|
||||||
XRRScreenConfiguration *conf = XRRGetScreenInfo(display, root);
|
XRRScreenConfiguration *conf = XRRGetScreenInfo(display, root);
|
||||||
|
|
||||||
XRRScreenSize *xrrs;
|
XRRScreenSize *xrrs;
|
||||||
@ -260,7 +260,7 @@ Status XSetScreenConfiguration(int width, int height, short rate) {
|
|||||||
|
|
||||||
void XGetScreenConfiguration(int *width, int *height, short *rate) {
|
void XGetScreenConfiguration(int *width, int *height, short *rate) {
|
||||||
Display *display = getXDisplay();
|
Display *display = getXDisplay();
|
||||||
Window root = RootWindow(display, 0);
|
Window root = DefaultRootWindow(display);
|
||||||
XRRScreenConfiguration *conf = XRRGetScreenInfo(display, root);
|
XRRScreenConfiguration *conf = XRRGetScreenInfo(display, root);
|
||||||
|
|
||||||
Rotation current_rotation;
|
Rotation current_rotation;
|
||||||
@ -284,7 +284,7 @@ void XGetScreenConfiguration(int *width, int *height, short *rate) {
|
|||||||
|
|
||||||
void XGetScreenConfigurations() {
|
void XGetScreenConfigurations() {
|
||||||
Display *display = getXDisplay();
|
Display *display = getXDisplay();
|
||||||
Window root = RootWindow(display, 0);
|
Window root = DefaultRootWindow(display);
|
||||||
XRRScreenSize *xrrs;
|
XRRScreenSize *xrrs;
|
||||||
int num_sizes;
|
int num_sizes;
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ void XGetScreenConfigurations() {
|
|||||||
// Inspired by https://github.com/raboof/xrandr/blob/master/xrandr.c
|
// Inspired by https://github.com/raboof/xrandr/blob/master/xrandr.c
|
||||||
void XCreateScreenMode(int width, int height, short rate) {
|
void XCreateScreenMode(int width, int height, short rate) {
|
||||||
Display *display = getXDisplay();
|
Display *display = getXDisplay();
|
||||||
Window root = RootWindow(display, 0);
|
Window root = DefaultRootWindow(display);
|
||||||
|
|
||||||
char name[128];
|
char name[128];
|
||||||
XRRModeInfo mode;
|
XRRModeInfo mode;
|
||||||
|
Loading…
Reference in New Issue
Block a user