[maemo-commits] [maemo-commits] r17221 - in projects/haf/trunk/sapwood: . server
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Fri Jan 16 15:31:38 EET 2009
- Previous message: [maemo-commits] r17220 - in projects/haf/trunk/sapwood: . tests
- Next message: [maemo-commits] r17222 - in projects/haf/trunk/sapwood: . tests
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: herzi Date: 2009-01-16 15:31:36 +0200 (Fri, 16 Jan 2009) New Revision: 17221 Modified: projects/haf/trunk/sapwood/ChangeLog projects/haf/trunk/sapwood/server/sapwood-server.c Log: 2009-01-16 Sven Herzberg <sven at imendio.com> Support three depths, system, 24 and 32... * server/sapwood-server.c (extract_pixmap_single), (pixbuf_open_response_new), (main): support three depths; enable fatal warnings when arguments are passed Modified: projects/haf/trunk/sapwood/ChangeLog =================================================================== --- projects/haf/trunk/sapwood/ChangeLog 2009-01-16 13:31:31 UTC (rev 17220) +++ projects/haf/trunk/sapwood/ChangeLog 2009-01-16 13:31:36 UTC (rev 17221) @@ -1,5 +1,13 @@ 2009-01-16 Sven Herzberg <sven at imendio.com> + Support three depths, system, 24 and 32... + + * server/sapwood-server.c (extract_pixmap_single), + (pixbuf_open_response_new), (main): support three depths; enable fatal + warnings when arguments are passed + +2009-01-16 Sven Herzberg <sven at imendio.com> + Don't echo the screen name; this reduces the noise from running the test cases Modified: projects/haf/trunk/sapwood/server/sapwood-server.c =================================================================== --- projects/haf/trunk/sapwood/server/sapwood-server.c 2009-01-16 13:31:31 UTC (rev 17220) +++ projects/haf/trunk/sapwood/server/sapwood-server.c 2009-01-16 13:31:36 UTC (rev 17221) @@ -85,7 +85,7 @@ GdkPixmap *pixmap; cairo_t *cr; - g_assert (depth == server_depth || depth == 32); + g_assert (depth == server_depth || depth == 24 || depth == 32); if (depth != 32) { pixmap = gdk_pixmap_new (NULL, width, height, server_depth); @@ -93,7 +93,7 @@ gdk_drawable_set_colormap (pixmap, gdk_screen_get_system_colormap (gdk_screen_get_default ())); cr = gdk_cairo_create (pixmap); - } else { + } else if (depth == 32) { pixmap = gdk_pixmap_new (NULL, width, height, depth); gdk_drawable_set_colormap (pixmap, gdk_screen_get_rgba_colormap (gdk_screen_get_default ())); @@ -105,6 +105,8 @@ cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0); cairo_paint (cr); cairo_restore (cr); + } else { + g_assert_not_reached (); } gdk_cairo_set_source_pixbuf (cr, pixbuf, -x, -y); @@ -252,7 +254,7 @@ GdkPixbuf *pixbuf; GError *err = NULL; - g_return_val_if_fail (req->depth == server_depth || req->depth == 32, NULL); + g_return_val_if_fail (req->depth == server_depth || req->depth == 24 || req->depth == 32, NULL); pixbuf = gdk_pixbuf_new_from_file (req->filename, &err); if (pixbuf) @@ -585,6 +587,10 @@ gdk_init (&argc, &argv); + if (argc > 1) { + g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING); + } + server_depth = get_display_depth (); sock_path = sapwood_socket_path_get_default ();
- Previous message: [maemo-commits] r17220 - in projects/haf/trunk/sapwood: . tests
- Next message: [maemo-commits] r17222 - in projects/haf/trunk/sapwood: . tests
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]