gdm/fix-theme-related-crash.patch
Ray Strode b9e0d7554b don't call render_frame if there's no frame
If the theme lacks a frame gtk_render_frame will throw
a fit and make the greeter nose dive.
2011-02-04 15:12:07 -05:00

32 lines
1.1 KiB
Diff

From 6bb88258c9ce7c9b2a0477c697d64e2a36f42dfd Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 4 Feb 2011 15:06:11 -0500
Subject: [PATCH] greeter: don't call render_frame if there's no frame
If the theme lacks a frame gtk_render_frame will throw
a fit and make the greeter nose dive.
---
gui/simple-greeter/gdm-scrollable-widget.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/gui/simple-greeter/gdm-scrollable-widget.c b/gui/simple-greeter/gdm-scrollable-widget.c
index 8a9ea25..1f8e807 100644
--- a/gui/simple-greeter/gdm-scrollable-widget.c
+++ b/gui/simple-greeter/gdm-scrollable-widget.c
@@ -598,8 +598,10 @@ gdm_scrollable_widget_draw (GtkWidget *widget,
height = widget_allocation.height;
height -= padding.top + padding.bottom;
- gtk_render_frame (context, cr,
- x, y, width, height);
+ if (width > 0 && height > 0) {
+ gtk_render_frame (context, cr,
+ x, y, width, height);
+ }
return GTK_WIDGET_CLASS (gdm_scrollable_widget_parent_class)->draw (widget, cr);
}
--
1.7.4