[gimp/soc-2010-cage-2] app: gimp_widget_flush_expose() return if the widget is not drawable
- From: Michael Muré <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2010-cage-2] app: gimp_widget_flush_expose() return if the widget is not drawable
- Date: Thu, 30 Dec 2010 18:08:38 +0000 (UTC)
commit 63f2cc2129da2494f7d71cc6cf7d55701609b9b6
Author: Michael Natterer <mitch gimp org>
Date: Wed Nov 10 00:13:07 2010 +0100
app: gimp_widget_flush_expose() return if the widget is not drawable
app/widgets/gimpwidgets-utils.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c
index 664cd21..21df3d7 100644
--- a/app/widgets/gimpwidgets-utils.c
+++ b/app/widgets/gimpwidgets-utils.c
@@ -1149,10 +1149,10 @@ void
gimp_tools_set_tool_options_gui (GimpToolOptions *tool_options,
GtkWidget *widget)
{
- g_object_set_data_full (G_OBJECT (tool_options),
- GIMP_TOOL_OPTIONS_GUI_KEY,
- widget,
- widget ? (GDestroyNotify) g_object_unref : NULL);
+ g_object_set_data_full (G_OBJECT (tool_options),
+ GIMP_TOOL_OPTIONS_GUI_KEY,
+ widget,
+ widget ? (GDestroyNotify) g_object_unref : NULL);
}
void
@@ -1160,6 +1160,11 @@ gimp_widget_flush_expose (GtkWidget *widget)
{
GList *event_list = NULL;
+ g_return_if_fail (GTK_IS_WIDGET (widget));
+
+ if (! gtk_widget_is_drawable (widget))
+ return;
+
gdk_window_process_updates (gtk_widget_get_window (widget), FALSE);
while (gdk_events_pending ())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]