mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-06 07:20:16 +01:00
boilerplate: Offset the xlib window
An idea courtesy of Benjamin Otte is to stress the drivers a bit more by not rendering to 0,0. Under various circumstances rendering to a Window is mapped onto the Screen root Window with a collection of offsets and clips by X. It is easy for the driver to make a mistake and misrender...
This commit is contained in:
parent
51b0c21f02
commit
bac5c28a18
1 changed files with 2 additions and 2 deletions
|
|
@ -302,11 +302,11 @@ _cairo_boilerplate_xlib_window_create_surface (const char *name,
|
|||
|
||||
/* tile the windows so threads do not overlap */
|
||||
scr = XScreenOfDisplay (dpy, screen);
|
||||
x = y = 0;
|
||||
x = 10; y = 15;
|
||||
if (id-- > 1) do {
|
||||
x += max_width;
|
||||
if (x + max_width > WidthOfScreen (scr)) {
|
||||
x = 0;
|
||||
x = 10;
|
||||
y += max_height;
|
||||
if (y + max_height > HeightOfScreen (scr)) {
|
||||
XCloseDisplay (dpy);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue