diff options
author | xyz <gky44px1999@gmail.com> | 2022-05-02 17:47:55 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2022-05-02 17:47:55 -0700 |
commit | f2705405d77cae15fb41b10daef4416257ee17f0 (patch) | |
tree | 93349d7759be3c4dfd0917da49cdd5569e5cdaa6 | |
parent | 55bc3e8a4ab8447b616d3311c6e006a53aa2943d (diff) |
use scr->height and width instead of DisplayWidth()
-rw-r--r-- | xcross.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xcross.c b/xcross.c index 08767ef..0532c21 100644 --- a/xcross.c +++ b/xcross.c @@ -26,11 +26,11 @@ int main (void) &gcval); XQueryPointer(disp, root, &window_tmp, &window_tmp, &rootx, &rooty, &int_tmp, &int_tmp, &uint_tmp); - //printf("%d\n", DisplayWidth(disp, DefaultScreen(disp))); - //printf("%d\n\n", DisplayHeight(disp, DefaultScreen(disp))); + //printf("%d\n", scr->width); + //printf("%d\n\n", scr->height); // XGetGeometry() maybe better, instead of DisplayHeight() and DisplayWidth() - XDrawLine(disp, root, gc, rootx, 0, rootx, DisplayHeight(disp, DefaultScreen(disp))); - XDrawLine(disp, root, gc, 0, rooty, DisplayWidth(disp, DefaultScreen(disp)), rooty); + XDrawLine(disp, root, gc, rootx, 0, rootx, scr->height); + XDrawLine(disp, root, gc, 0, rooty, scr->width, rooty); //XDrawRectangle(disp, root, gc, 1000, 1000, 1000, 1000); XFlush(disp); |