summaryrefslogtreecommitdiffstats
path: root/xorg/tests/randr/trandr.c
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2013-02-17 19:11:17 -0800
committerJay Sorg <jay.sorg@gmail.com>2013-02-17 19:11:17 -0800
commit3365cae66b911f4d21a34948bf81be57bd451c47 (patch)
treea29b3d5dbd739857eef400aefc41879665038196 /xorg/tests/randr/trandr.c
parentf04e162b037d79bceef7452ba6312c16049e5116 (diff)
downloadxrdp-proprietary-3365cae66b911f4d21a34948bf81be57bd451c47.tar.gz
xrdp-proprietary-3365cae66b911f4d21a34948bf81be57bd451c47.zip
randr test change
Diffstat (limited to 'xorg/tests/randr/trandr.c')
-rw-r--r--xorg/tests/randr/trandr.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/xorg/tests/randr/trandr.c b/xorg/tests/randr/trandr.c
index f0be27e0..0ee185cc 100644
--- a/xorg/tests/randr/trandr.c
+++ b/xorg/tests/randr/trandr.c
@@ -59,13 +59,18 @@ main(int argc, char **argv)
int eventMask;
int white;
int black;
- int event_base;
- int error_base;
+ int rr_event_base;
+ int rr_error_base;
int ver_maj;
int ver_min;
int cont;
disp = XOpenDisplay(0);
+ if (disp == 0)
+ {
+ printf("error opening display\n");
+ return 1;
+ }
screenNumber = DefaultScreen(disp);
white = WhitePixel(disp, screenNumber);
black = BlackPixel(disp, screenNumber);
@@ -89,7 +94,7 @@ main(int argc, char **argv)
PointerMotionMask | ExposureMask | PropertyChangeMask;
XSelectInput(disp, win, eventMask);
- if (!XRRQueryExtension(disp, &event_base, &error_base))
+ if (!XRRQueryExtension(disp, &rr_event_base, &rr_error_base))
{
printf("error randr\n");
return 1;
@@ -102,7 +107,6 @@ main(int argc, char **argv)
cont = 1;
while (cont)
{
- printf("loop\n");
XNextEvent(disp, &ev);
switch (ev.type)
{
@@ -119,11 +123,11 @@ main(int argc, char **argv)
}
break;
default:
- if ((ev.type >= event_base) &&
- (ev.type < event_base + RRNumberEvents))
+ if ((ev.type >= rr_event_base) &&
+ (ev.type < rr_event_base + RRNumberEvents))
{
printf("randr\n");
- process_randr(disp, win, event_base, &ev);
+ process_randr(disp, win, rr_event_base, &ev);
}
break;
}