Author: benny Date: 2006-12-21 21:50:25 +0000 (Thu, 21 Dec 2006) New Revision: 24158
Modified: xfce4-session/trunk/ChangeLog xfce4-session/trunk/libxfsm/xfsm-util.c xfce4-session/trunk/xfce4-session/shutdown.c xfce4-session/trunk/xfce4-session/xfsm-fadeout.c Log: 2006-12-21 Benedikt Meurer <[EMAIL PROTECTED]> * libxfsm/xfsm-util.c, xfce4-session/shutdown.c: Apply Jasper's patch to drop the old-style header from the logout dialog. Bug #2653. * xfce4-session/xfsm-fadeout.c: Use Xrender to fadeout the background if cairo is available, as it gives better results. Modified: xfce4-session/trunk/ChangeLog =================================================================== --- xfce4-session/trunk/ChangeLog 2006-12-21 20:53:43 UTC (rev 24157) +++ xfce4-session/trunk/ChangeLog 2006-12-21 21:50:25 UTC (rev 24158) @@ -1,3 +1,10 @@ +2006-12-21 Benedikt Meurer <[EMAIL PROTECTED]> + + * libxfsm/xfsm-util.c, xfce4-session/shutdown.c: Apply Jasper's patch + to drop the old-style header from the logout dialog. Bug #2653. + * xfce4-session/xfsm-fadeout.c: Use Xrender to fadeout the background + if cairo is available, as it gives better results. + 2006-11-12 Benedikt Meurer <[EMAIL PROTECTED]> * xfsm-shutdown-helper/main.c: Apply patch from Francis Gudin Modified: xfce4-session/trunk/libxfsm/xfsm-util.c =================================================================== --- xfce4-session/trunk/libxfsm/xfsm-util.c 2006-12-21 20:53:43 UTC (rev 24157) +++ xfce4-session/trunk/libxfsm/xfsm-util.c 2006-12-21 21:50:25 UTC (rev 24158) @@ -215,7 +215,7 @@ gtk_widget_show (box2); gtk_container_add (GTK_CONTAINER (box1), box2); - gtk_container_set_border_width (GTK_CONTAINER (box2), 3); + gtk_container_set_border_width (GTK_CONTAINER (box2), 6); gtk_widget_reparent (GTK_BIN (window)->child, box2); gtk_container_add (GTK_CONTAINER (window), box1); Modified: xfce4-session/trunk/xfce4-session/shutdown.c =================================================================== --- xfce4-session/trunk/xfce4-session/shutdown.c 2006-12-21 20:53:43 UTC (rev 24157) +++ xfce4-session/trunk/xfce4-session/shutdown.c 2006-12-21 21:50:25 UTC (rev 24158) @@ -158,7 +158,6 @@ GtkWidget *halt_button; GtkWidget *cancel_button; GtkWidget *ok_button; - GtkWidget *header; GdkPixbuf *icon; gboolean saveonexit; gboolean autosave; @@ -304,12 +303,6 @@ dbox = GTK_DIALOG(dialog)->vbox; - header = xfce_create_header (NULL, _("End Session")); - gtk_container_set_border_width (GTK_CONTAINER (GTK_BIN (header)->child), - BORDER+2); - gtk_widget_show (header); - gtk_box_pack_start (GTK_BOX (dbox), header, TRUE, TRUE, 0); - vbox = gtk_vbox_new(FALSE, BORDER); gtk_box_pack_start(GTK_BOX(dbox), vbox, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (vbox), BORDER); Modified: xfce4-session/trunk/xfce4-session/xfsm-fadeout.c =================================================================== --- xfce4-session/trunk/xfce4-session/xfsm-fadeout.c 2006-12-21 20:53:43 UTC (rev 24157) +++ xfce4-session/trunk/xfce4-session/xfsm-fadeout.c 2006-12-21 21:50:25 UTC (rev 24158) @@ -1,6 +1,6 @@ /* $Id$ */ /*- - * Copyright (c) 2004 Benedikt Meurer <[EMAIL PROTECTED]> + * Copyright (c) 2004-2006 Benedikt Meurer <[EMAIL PROTECTED]> * All rights reserved. * * This program is free software; you can redistribute it and/or modify @@ -23,6 +23,8 @@ #include <config.h> #endif +#include <gtk/gtk.h> + #include <xfce4-session/xfsm-fadeout.h> @@ -80,6 +82,14 @@ cursor = gdk_cursor_new (GDK_WATCH); + attr.x = 0; + attr.y = 0; + attr.event_mask = 0; + attr.wclass = GDK_INPUT_OUTPUT; + attr.window_type = GDK_WINDOW_TEMP; + attr.cursor = cursor; + attr.override_redirect = TRUE; + for (n = 0; n < gdk_display_get_n_screens (display); ++n) { screen = g_new (FoScreen, 1); @@ -98,15 +108,8 @@ 0, 0, 0, 0, width, height); xfsm_fadeout_drawable_mono (fadeout, GDK_DRAWABLE (screen->backbuf)); - attr.x = 0; - attr.y = 0; attr.width = width; attr.height = height; - attr.event_mask = 0; - attr.wclass = GDK_INPUT_OUTPUT; - attr.window_type = GDK_WINDOW_TEMP; - attr.cursor = cursor; - attr.override_redirect = TRUE; screen->window = gdk_window_new (root, &attr, GDK_WA_X | GDK_WA_Y | GDK_WA_NOREDIR | GDK_WA_CURSOR); @@ -150,6 +153,15 @@ xfsm_fadeout_drawable_mono (XfsmFadeout *fadeout, GdkDrawable *drawable) { +#if GTK_CHECK_VERSION(2,8,0) + cairo_t *cr; + + /* using Xrender gives better results */ + cr = gdk_cairo_create (drawable); + gdk_cairo_set_source_color (cr, &fadeout->color); + cairo_paint_with_alpha (cr, 0.5); + cairo_destroy (cr); +#else GdkGCValues values; GdkBitmap *bm; GdkGC *gc; @@ -175,5 +187,6 @@ g_object_unref (G_OBJECT (gc)); g_object_unref (G_OBJECT (bm)); +#endif } _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits