summaryrefslogtreecommitdiff
path: root/boilerplate/cairo-boilerplate-xlib.c
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-10-26 19:16:17 +0200
committerAndrea Canciani <ranma42@gmail.com>2011-11-12 20:49:08 +0100
commit549b1f8d4bf6e20cecd281343f5e4630938697cc (patch)
treebefe6e6041721462ae7bbb4b7e93d6e3dfa1a3e2 /boilerplate/cairo-boilerplate-xlib.c
parentb07b242220daab5b9252d9f0d889886ad74bd31d (diff)
boilerplate: Remove unused thread id parameter
The thread id is not used anymore (it is always == 0), so it can be removed.
Diffstat (limited to 'boilerplate/cairo-boilerplate-xlib.c')
-rw-r--r--boilerplate/cairo-boilerplate-xlib.c45
1 files changed, 4 insertions, 41 deletions
diff --git a/boilerplate/cairo-boilerplate-xlib.c b/boilerplate/cairo-boilerplate-xlib.c
index 38c113575..abd1ba989 100644
--- a/boilerplate/cairo-boilerplate-xlib.c
+++ b/boilerplate/cairo-boilerplate-xlib.c
@@ -280,7 +280,6 @@ _cairo_boilerplate_xlib_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
- int id,
void **closure)
{
xlib_target_closure_t *xtc;
@@ -323,13 +322,11 @@ _cairo_boilerplate_xlib_window_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
- int id,
void **closure)
{
xlib_target_closure_t *xtc;
Display *dpy;
- Screen *scr;
- int screen, x, y;
+ int screen;
XSetWindowAttributes attr;
cairo_surface_t *surface;
@@ -374,25 +371,9 @@ _cairo_boilerplate_xlib_window_create_surface (const char *name,
return NULL;
}
- /* tile the windows so threads do not overlap */
- scr = XScreenOfDisplay (dpy, screen);
- x = 10; y = 15;
- if (id-- > 1) do {
- x += max_width;
- if (x + max_width > WidthOfScreen (scr)) {
- x = 10;
- y += max_height;
- if (y + max_height > HeightOfScreen (scr)) {
- XCloseDisplay (dpy);
- free (xtc);
- return NULL;
- }
- }
- } while (--id);
-
attr.override_redirect = True;
xtc->drawable = XCreateWindow (dpy, DefaultRootWindow (dpy),
- x, y,
+ 0, 0,
width, height, 0,
DefaultDepth (dpy, screen),
InputOutput,
@@ -475,13 +456,11 @@ _cairo_boilerplate_xlib_fallback_create_surface (const char *name,
double max_width,
double max_height,
cairo_boilerplate_mode_t mode,
- int id,
void **closure)
{
xlib_target_closure_t *xtc;
Display *dpy;
- Screen *scr;
- int screen, x, y;
+ int screen;
XSetWindowAttributes attr;
cairo_surface_t *surface;
@@ -526,25 +505,9 @@ _cairo_boilerplate_xlib_fallback_create_surface (const char *name,
return NULL;
}
- /* tile the windows so threads do not overlap */
- scr = XScreenOfDisplay (dpy, screen);
- x = y = 0;
- if (id-- > 1) do {
- x += max_width;
- if (x + max_width > WidthOfScreen (scr)) {
- x = 0;
- y += max_height;
- if (y + max_height > HeightOfScreen (scr)) {
- XCloseDisplay (dpy);
- free (xtc);
- return NULL;
- }
- }
- } while (--id);
-
attr.override_redirect = True;
xtc->drawable = XCreateWindow (dpy, DefaultRootWindow (dpy),
- x, y,
+ 0, 0,
width, height, 0,
DefaultDepth (dpy, screen),
InputOutput,