[gtk+] Make gdk_x11_window_set_theme_variant do nothing for non-toplevels
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Make gdk_x11_window_set_theme_variant do nothing for non-toplevels
- Date: Sun, 3 Apr 2011 21:41:37 +0000 (UTC)
commit d46f0db38bf811d404b122784445efec221b37b6
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Apr 3 17:40:37 2011 -0400
Make gdk_x11_window_set_theme_variant do nothing for non-toplevels
This avoids problems when calling this e.g. on offscreen windows.
gdk/x11/gdkwindow-x11.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index fd62e4c..78ec0a4 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -3107,7 +3107,12 @@ void
gdk_x11_window_set_theme_variant (GdkWindow *window,
char *variant)
{
- GdkDisplay *display = gdk_window_get_display (window);
+ GdkDisplay *display;
+
+ if (!WINDOW_IS_TOPLEVEL (window))
+ return;
+
+ display = gdk_window_get_display (window);
if (variant != NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]