[gtk+] Check screen really changed before notifying it and invalidating the context
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Check screen really changed before notifying it and invalidating the context
- Date: Sat, 4 Dec 2010 15:26:07 +0000 (UTC)
commit 7a5a622998a32ef4e420cddfa5369bd630dc8b30
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Fri Nov 26 09:01:17 2010 +0100
Check screen really changed before notifying it and invalidating the context
gtk/gtkstylecontext.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 2cee500..7e1dd2c 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -2556,8 +2556,12 @@ gtk_style_context_set_screen (GtkStyleContext *context,
GtkStyleContextPrivate *priv;
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
+ g_return_if_fail (GDK_IS_SCREEN (screen));
priv = context->priv;
+ if (priv->screen == screen)
+ return;
+
priv->screen = screen;
g_object_notify (G_OBJECT (context), "screen");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]