[cairo-commit] cairo/src cairo-xlib-private.h, 1.1, 1.2 cairo-xlib-screen.c, 1.1, 1.2 cairo-xlib-surface.c, 1.93, 1.94

Owen Taylor commit at pdx.freedesktop.org
Sat Jul 23 05:37:25 PDT 2005


Committed by: otaylor

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv28474/src

Modified Files:
	cairo-xlib-private.h cairo-xlib-screen.c cairo-xlib-surface.c 
Log Message:
2005-07-23  Owen Taylor  <otaylor at redhat.com>

        * src/cairo-xlib-private.h src/cairo-xlib-screen.c: Switch to using
        Screen * not screen number to match surface code.

        * src/cairo-xlib-screen.c: Get the screen info for the right screen
        for the surface.


Index: cairo-xlib-private.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-xlib-private.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cairo-xlib-private.h	21 Jul 2005 13:52:13 -0000	1.1
+++ cairo-xlib-private.h	23 Jul 2005 12:37:23 -0000	1.2
@@ -42,13 +42,13 @@
     cairo_xlib_screen_info_t *next;
     
     Display *display;
-    int screen;
+    Screen *screen;
     cairo_bool_t has_render;
     
     cairo_font_options_t font_options;
 };
 
 cairo_private cairo_xlib_screen_info_t *
-_cairo_xlib_screen_info_get (Display *display, int screen);
+_cairo_xlib_screen_info_get (Display *display, Screen *screen);
 
 #endif /* CAIRO_XLIB_PRIVATE_H */

Index: cairo-xlib-screen.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-xlib-screen.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cairo-xlib-screen.c	21 Jul 2005 13:52:13 -0000	1.1
+++ cairo-xlib-screen.c	23 Jul 2005 12:37:23 -0000	1.2
@@ -159,7 +159,8 @@
 #if RENDER_MAJOR > 0 || RENDER_MINOR >= 6
 	if (info->has_render)
 	{
-	    int render_order = XRenderQuerySubpixelOrder (info->display, info->screen);
+	    int render_order = XRenderQuerySubpixelOrder (info->display,
+							  XScreenNumberOfScreen (info->screen));
 	  
 	    switch (render_order)
 	    {
@@ -272,7 +273,7 @@
 
 
 cairo_private cairo_xlib_screen_info_t *
-_cairo_xlib_screen_info_get (Display *dpy, int screen)
+_cairo_xlib_screen_info_get (Display *dpy, Screen *screen)
 {
     cairo_xlib_screen_info_t *info;
     cairo_xlib_screen_info_t **prev;

Index: cairo-xlib-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-xlib-surface.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- cairo-xlib-surface.c	21 Jul 2005 21:31:28 -0000	1.93
+++ cairo-xlib-surface.c	23 Jul 2005 12:37:23 -0000	1.94
@@ -1396,7 +1396,7 @@
     cairo_xlib_surface_t *surface;
     cairo_xlib_screen_info_t *screen_info;
 
-    screen_info = _cairo_xlib_screen_info_get (dpy, DefaultScreen (dpy));
+    screen_info = _cairo_xlib_screen_info_get (dpy, screen);
     if (!screen_info)
 	return NULL;
 




More information about the cairo-commit mailing list