diff options
author | Benedikt Meurer <benny@xfce.org> | 2006-12-21 21:50:25 +0000 |
---|---|---|
committer | Benedikt Meurer <benny@xfce.org> | 2006-12-21 21:50:25 +0000 |
commit | ed0bd9e61c3094a9997be7325fcc7318b442b1db (patch) | |
tree | 4321b9a4445fc2fc942fc0323ff56fbae23dab95 | |
parent | e6e2b568f96494f977a3b91dc4ba3e9162c72d02 (diff) | |
download | xfce4-session-ed0bd9e61c3094a9997be7325fcc7318b442b1db.tar.gz |
2006-12-21 Benedikt Meurer <benny@xfce.org>
* 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.
(Old svn revision: 24158)
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | libxfsm/xfsm-util.c | 2 | ||||
-rw-r--r-- | xfce4-session/shutdown.c | 7 | ||||
-rw-r--r-- | xfce4-session/xfsm-fadeout.c | 29 |
4 files changed, 29 insertions, 16 deletions
@@ -1,3 +1,10 @@ +2006-12-21 Benedikt Meurer <benny@xfce.org> + + * 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 <benny@xfce.org> * xfsm-shutdown-helper/main.c: Apply patch from Francis Gudin diff --git a/libxfsm/xfsm-util.c b/libxfsm/xfsm-util.c index fd1fd473..88c563a7 100644 --- a/libxfsm/xfsm-util.c +++ b/libxfsm/xfsm-util.c @@ -215,7 +215,7 @@ xfsm_window_add_border (GtkWindow *window) 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); diff --git a/xfce4-session/shutdown.c b/xfce4-session/shutdown.c index e5419a92..965ea800 100644 --- a/xfce4-session/shutdown.c +++ b/xfce4-session/shutdown.c @@ -158,7 +158,6 @@ shutdownDialog(gint *shutdownType, gboolean *saveSession) GtkWidget *halt_button; GtkWidget *cancel_button; GtkWidget *ok_button; - GtkWidget *header; GdkPixbuf *icon; gboolean saveonexit; gboolean autosave; @@ -304,12 +303,6 @@ shutdownDialog(gint *shutdownType, gboolean *saveSession) 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); diff --git a/xfce4-session/xfsm-fadeout.c b/xfce4-session/xfsm-fadeout.c index 9fb3d93c..690bd6a2 100644 --- a/xfce4-session/xfsm-fadeout.c +++ b/xfce4-session/xfsm-fadeout.c @@ -1,6 +1,6 @@ /* $Id$ */ /*- - * Copyright (c) 2004 Benedikt Meurer <benny@xfce.org> + * Copyright (c) 2004-2006 Benedikt Meurer <benny@xfce.org> * 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 @@ xfsm_fadeout_new (GdkDisplay *display) 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 @@ xfsm_fadeout_new (GdkDisplay *display) 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 @@ static void 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 @@ xfsm_fadeout_drawable_mono (XfsmFadeout *fadeout, g_object_unref (G_OBJECT (gc)); g_object_unref (G_OBJECT (bm)); +#endif } |