[gimp/cage: 39/130] 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/cage: 39/130] app: gimp_widget_flush_expose() return if the widget is not drawable
- Date: Thu, 30 Dec 2010 17:51:15 +0000 (UTC)
commit c81aff701f972b2a4b7e080ff1ced59ef6234cf3
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]