rpms/gnome-session/devel gnome-session-2.12.0-shaped.patch, 1.2, 1.3 gnome-session.spec, 1.45, 1.46
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Jan 12 07:33:25 UTC 2006
Author: rstrode
Update of /cvs/dist/rpms/gnome-session/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv26314
Modified Files:
gnome-session-2.12.0-shaped.patch gnome-session.spec
Log Message:
- Fix screen corruption around splash screen shape (bug 177502)
gnome-session-2.12.0-shaped.patch:
splash-widget.c | 62 +++++++++++++++++++++++++-------------------------------
splash-widget.h | 7 ++----
2 files changed, 31 insertions(+), 38 deletions(-)
Index: gnome-session-2.12.0-shaped.patch
===================================================================
RCS file: /cvs/dist/rpms/gnome-session/devel/gnome-session-2.12.0-shaped.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gnome-session-2.12.0-shaped.patch 20 Dec 2005 21:30:22 -0000 1.2
+++ gnome-session-2.12.0-shaped.patch 12 Jan 2006 07:33:16 -0000 1.3
@@ -1,100 +1,14 @@
---- gnome-session-2.12.0/gnome-session/splash-widget.c.shaped 2005-12-20 15:45:53.000000000 -0500
-+++ gnome-session-2.12.0/gnome-session/splash-widget.c 2005-12-20 16:23:55.000000000 -0500
-@@ -138,7 +138,7 @@
- return FALSE;
-
- if (gdk_rectangle_intersect (
-- &event->area, &sw->image_bounds, &exposed))
-+ &event->area, &sw->image_bounds, &exposed)) {
- gdk_draw_drawable (
- GDK_DRAWABLE (widget->window),
- widget->style->black_gc,
-@@ -147,6 +147,15 @@
- exposed.x, exposed.y,
- exposed.width, exposed.height);
-
-+ if (sw->bg_mask)
-+ gdk_window_shape_combine_mask (
-+ widget->window,
-+ sw->bg_mask,
-+ 0,
-+ 0);
-+
-+ }
-+
- for (l = sw->icons; l; l = l->next) {
- SplashIcon *si = l->data;
-
-@@ -228,7 +237,9 @@
-
- if (sw->background && widget->window) {
- int width, height;
--
-+ GdkPixmap *mask;
-+ mask = NULL;
-+
- width = gdk_pixbuf_get_width (sw->background);
- height = gdk_pixbuf_get_height (sw->background);
-
-@@ -237,6 +248,11 @@
- width, height,
- gdk_drawable_get_visual (widget->window)->depth);
-
-+ mask = gdk_pixmap_new (
-+ widget->window,
-+ width, height,
-+ 1);
-+
- if (pm) {
- gdk_pixbuf_render_to_drawable (
- sw->background, GDK_DRAWABLE (pm),
-@@ -247,6 +263,22 @@
-
- gdk_window_set_back_pixmap (
- widget->window, pm, FALSE);
-+
-+ if (mask) {
-+ gdk_pixbuf_render_threshold_alpha (
-+ sw->background, (GdkBitmap *) mask,
-+ 0, 0, 0, 0, width, height,
-+ 125);
-+
-+ gdk_window_shape_combine_mask (
-+ widget->window,
-+ (GdkBitmap *) mask,
-+ 0,
-+ 0);
-+
-+ }
-+
-+ sw->bg_mask = (GdkBitmap *) mask;
- sw->bg_pixmap = pm;
- }
- }
-@@ -262,6 +294,12 @@
- sw->bg_pixmap = NULL;
- }
-
-+ if (sw->bg_mask) {
-+ g_object_unref (sw->bg_mask);
-+ sw->bg_mask = NULL;
-+ }
-+
-+
- GNOME_CALL_PARENT (GTK_WIDGET_CLASS, unrealize, (widget));
- }
-
---- gnome-session-2.12.0/gnome-session/splash-widget.h.shaped 2005-12-20 16:10:05.000000000 -0500
-+++ gnome-session-2.12.0/gnome-session/splash-widget.h 2005-12-20 16:18:02.000000000 -0500
-@@ -37,6 +37,7 @@
+--- gnome-session-2.12.0/gnome-session/splash-widget.h.shaped 2005-08-08 03:35:13.000000000 -0400
++++ gnome-session-2.12.0/gnome-session/splash-widget.h 2006-01-12 02:19:59.000000000 -0500
+@@ -36,7 +36,6 @@
+ GnomeIconTheme *icon_theme;
GdkPixbuf *background;
- GdkPixmap *bg_pixmap;
-+ GdkBitmap *bg_mask;
+- GdkPixmap *bg_pixmap;
GList *icons;
PangoLayout *layout;
PangoAttribute *font_size_attr;
-@@ -66,13 +67,13 @@
+@@ -66,13 +65,13 @@
#define SPLASH_BASE_HEIGHT 220
/* offset from bottom of label & font */
@@ -111,3 +25,96 @@
#define SPLASH_BASE_ICON_SIZE 36
#define SPLASH_BASE_ICON_ROWS 1
+--- gnome-session-2.12.0/gnome-session/splash-widget.c.shaped 2006-01-12 02:19:59.000000000 -0500
++++ gnome-session-2.12.0/gnome-session/splash-widget.c 2006-01-12 02:22:28.000000000 -0500
+@@ -137,16 +137,6 @@
+ if (!GTK_WIDGET_DRAWABLE (widget))
+ return FALSE;
+
+- if (gdk_rectangle_intersect (
+- &event->area, &sw->image_bounds, &exposed))
+- gdk_draw_drawable (
+- GDK_DRAWABLE (widget->window),
+- widget->style->black_gc,
+- GDK_DRAWABLE (sw->bg_pixmap),
+- exposed.x, exposed.y,
+- exposed.x, exposed.y,
+- exposed.width, exposed.height);
+-
+ for (l = sw->icons; l; l = l->next) {
+ SplashIcon *si = l->data;
+
+@@ -221,33 +211,42 @@
+ static void
+ splash_widget_realize (GtkWidget *widget)
+ {
+- GdkPixmap *pm;
+ SplashWidget *sw = (SplashWidget *) widget;
+
+ GNOME_CALL_PARENT (GTK_WIDGET_CLASS, realize, (widget));
+
+ if (sw->background && widget->window) {
+- int width, height;
++ GdkPixmap *pixmap;
++ GdkBitmap *mask;
++ GdkColormap *colormap;
+
+- width = gdk_pixbuf_get_width (sw->background);
+- height = gdk_pixbuf_get_height (sw->background);
++ pixmap = NULL;
++ mask = NULL;
+
+- pm = gdk_pixmap_new (
+- widget->window,
+- width, height,
+- gdk_drawable_get_visual (widget->window)->depth);
++ colormap = gtk_widget_get_colormap (widget);
++ gdk_pixbuf_render_pixmap_and_mask_for_colormap (sw->background,
++ colormap,
++ &pixmap, &mask,
++ 125);
+
+- if (pm) {
+- gdk_pixbuf_render_to_drawable (
+- sw->background, GDK_DRAWABLE (pm),
+- widget->style->black_gc,
+- 0, 0, 0, 0, width, height,
+- GDK_RGB_DITHER_MAX,
+- 0, 0);
+-
+- gdk_window_set_back_pixmap (
+- widget->window, pm, FALSE);
+- sw->bg_pixmap = pm;
++ if (pixmap) {
++ GtkStyle *style;
++
++ style = gtk_style_copy (widget->style);
++ style->bg_pixmap[GTK_STATE_NORMAL] = pixmap;
++
++ gtk_widget_set_style (widget, style);
++ g_object_unref (style);
++
++ if (mask) {
++ gdk_window_shape_combine_mask (widget->window,
++ mask, 0, 0);
++
++ g_object_unref (mask);
++ }
++
++ gtk_style_set_background (widget->style, widget->window,
++ GTK_STATE_NORMAL);
+ }
+ }
+ }
+@@ -257,11 +256,6 @@
+ {
+ SplashWidget *sw = (SplashWidget *) widget;
+
+- if (sw->bg_pixmap) {
+- g_object_unref (sw->bg_pixmap);
+- sw->bg_pixmap = NULL;
+- }
+-
+ GNOME_CALL_PARENT (GTK_WIDGET_CLASS, unrealize, (widget));
+ }
+
Index: gnome-session.spec
===================================================================
RCS file: /cvs/dist/rpms/gnome-session/devel/gnome-session.spec,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- gnome-session.spec 20 Dec 2005 21:39:11 -0000 1.45
+++ gnome-session.spec 12 Jan 2006 07:33:16 -0000 1.46
@@ -13,7 +13,7 @@
Summary: GNOME session manager
Name: gnome-session
Version: 2.12.0
-Release: 5
+Release: 6
URL: http://www.gnome.org
Source0: %{name}-%{version}.tar.bz2
Source1: redhat-default-session
@@ -148,6 +148,9 @@
%{_sysconfdir}/gconf/schemas/*.schemas
%changelog
+* Thu Jan 12 2005 Ray Strode <rstrode at redhat.com> - 2.12.0-6
+- Fix screen corruption around splash screen shape (bug 177502)
+
* Tue Dec 20 2005 John (J5) Palmieri <johnp at redhat.com> - 2.12.0-5
- Handle shaped window for splash screen
More information about the fedora-cvs-commits
mailing list