diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-11-02 15:46:26 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-11-02 15:46:26 +1000 |
commit | 7bd59b13c193b538dc99ffa8dad05c7ffad2d217 (patch) | |
tree | 1eb16e0a7ef7dc39cf27a66c22d23927249330b6 | |
parent | 29d68208a2923905effa15bb93b3c44451861a37 (diff) |
Split screen and screen_no in two, cairo needs Screen* arguments
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | multitouch.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/multitouch.c b/multitouch.c index d421c27..981b81d 100644 --- a/multitouch.c +++ b/multitouch.c @@ -15,7 +15,8 @@ struct multitouch { Display *dpy; - int screen; + int screen_no; + Screen* screen; Window root; Window win; int xi_opcode; @@ -63,7 +64,7 @@ static Window init_window(struct multitouch *mt) unsigned char mask[XIMaskLen(XI_LASTEVENT)]; win = XCreateSimpleWindow(mt->dpy, mt->root, 0, 0, mt->width, mt->height, - 0, 0, WhitePixel(mt->dpy, mt->screen)); + 0, 0, WhitePixel(mt->dpy, mt->screen_no)); XSelectInput(mt->dpy, win, ExposureMask); XMapWindow(mt->dpy, win); XMaskEvent(mt->dpy, ExposureMask, &event); @@ -88,7 +89,7 @@ static Pixmap init_pixmap(struct multitouch *mt) { Pixmap p; p = XCreatePixmap(mt->dpy, mt->win, mt->width, mt->height, - DefaultDepth(mt->dpy, mt->screen)); + DefaultDepth(mt->dpy, mt->screen_no)); return p; } @@ -110,7 +111,8 @@ static int init_x11(struct multitouch *mt, int width, int height) return error("Need XI 2.2\n"); mt->dpy = dpy; - mt->screen = DefaultScreen(dpy); + mt->screen_no = DefaultScreen(dpy); + mt->screen = DefaultScreenOfDisplay(dpy); mt->root = DefaultRootWindow(dpy); mt->xi_opcode = xi_opcode; mt->width = width; |