[maemo-commits] [maemo-commits] r17218 - in projects/haf/trunk/sapwood: . server
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Fri Jan 16 15:31:23 EET 2009
- Previous message: [maemo-commits] r17217 - in projects/haf/trunk/sapwood: . engine server
- Next message: [maemo-commits] r17219 - in projects/haf/trunk/sapwood: . tests
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: herzi Date: 2009-01-16 15:31:20 +0200 (Fri, 16 Jan 2009) New Revision: 17218 Modified: projects/haf/trunk/sapwood/ChangeLog projects/haf/trunk/sapwood/server/sapwood-server.c Log: 2009-01-16 Sven Herzberg <sven at imendio.com> Drop the temporary window. * server/sapwood-server.c (extract_pixmap_single): drop the window, set the colormap directly (instead of through the other drawable) Modified: projects/haf/trunk/sapwood/ChangeLog =================================================================== --- projects/haf/trunk/sapwood/ChangeLog 2009-01-16 13:31:14 UTC (rev 17217) +++ projects/haf/trunk/sapwood/ChangeLog 2009-01-16 13:31:20 UTC (rev 17218) @@ -1,5 +1,12 @@ 2009-01-16 Sven Herzberg <sven at imendio.com> + Drop the temporary window. + + * server/sapwood-server.c (extract_pixmap_single): drop the window, + set the colormap directly (instead of through the other drawable) + +2009-01-16 Sven Herzberg <sven at imendio.com> + Added proper and distinguishable logging domains * engine/Makefile.am, Modified: projects/haf/trunk/sapwood/server/sapwood-server.c =================================================================== --- projects/haf/trunk/sapwood/server/sapwood-server.c 2009-01-16 13:31:14 UTC (rev 17217) +++ projects/haf/trunk/sapwood/server/sapwood-server.c 2009-01-16 13:31:20 UTC (rev 17218) @@ -82,43 +82,22 @@ int width, int height, int depth, PixbufOpenResponse *rep) { - static GdkWindow* rgba_window = NULL; GdkPixmap *pixmap; cairo_t *cr; g_assert (depth == server_depth || depth == 32); - if (G_UNLIKELY (!rgba_window)) { - GdkWindowAttr attrs = { - NULL, /* gchar *title */ - 0, /* gint event_mask */ - 0, 0, /* gint x, y */ - 1, /* gint width */ - 1, /* gint height */ - GDK_INPUT_OUTPUT, /* GdkWindowClass wclass */ - NULL, /* GdkVisual *visual */ - NULL, /* GdkColormap *colormap */ - GDK_WINDOW_TOPLEVEL, /* GdkWindowType window_type */ - NULL, /* GdkCursor *cursor */ - NULL, /* gchar *wmclass_name */ - NULL, /* gchar *wmclass_class */ - TRUE, /* gboolean override_redirect */ - GDK_WINDOW_TYPE_HINT_NORMAL, /* GdkWindowTypeHint type_hint */ - }; - GdkScreen* screen = gdk_screen_get_default (); - attrs.colormap = gdk_screen_get_rgba_colormap (screen); - attrs.visual = gdk_colormap_get_visual (attrs.colormap); - rgba_window = gdk_window_new (gdk_screen_get_root_window (screen), &attrs, - GDK_WA_VISUAL | GDK_WA_COLORMAP); - } - if (depth != 32) { pixmap = gdk_pixmap_new (NULL, width, height, server_depth); + gdk_drawable_set_colormap (pixmap, gdk_screen_get_system_colormap (gdk_screen_get_default ())); + cr = gdk_cairo_create (pixmap); } else { - pixmap = gdk_pixmap_new (rgba_window, width, height, -1); + pixmap = gdk_pixmap_new (NULL, width, height, depth); + gdk_drawable_set_colormap (pixmap, gdk_screen_get_rgba_colormap (gdk_screen_get_default ())); + cr = gdk_cairo_create (pixmap); cairo_save (cr);
- Previous message: [maemo-commits] r17217 - in projects/haf/trunk/sapwood: . engine server
- Next message: [maemo-commits] r17219 - in projects/haf/trunk/sapwood: . tests
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]