diff options
Diffstat (limited to 'xlib.c')
-rw-r--r-- | xlib.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -159,6 +159,7 @@ xlib_open (int argc, char **argv) int screen; XSetWindowAttributes attr; int x, y; + enum split split; dpy = XOpenDisplay (NULL); if (dpy == NULL) @@ -176,7 +177,7 @@ xlib_open (int argc, char **argv) device->base.height = HeightOfScreen (scr); device_get_size (argc, argv, &device->base.width, &device->base.height); x = y = 0; - switch (device_get_split(argc, argv)) { + switch ((split = device_get_split(argc, argv))) { case SPLIT_NONE: break; case SPLIT_LEFT: @@ -209,6 +210,16 @@ xlib_open (int argc, char **argv) x = device->base.width /= 2; device->base.height /= 2; break; + + case SPLIT_1_16...SPLIT_16_16: + split -= SPLIT_1_16; + x = split & 3; + y = (split >> 2) & 3; + device->base.width /= 4; + device->base.height /= 4; + x *= device->base.width; + y *= device->base.height; + break; } attr.override_redirect = True; |