[gtk+/gtk-3-0] 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+/gtk-3-0] Make gdk_x11_window_set_theme_variant do nothing for non-toplevels
- Date: Sun, 3 Apr 2011 21:42:04 +0000 (UTC)
commit 9c1b238bf98b6354b011be9a62d5d175a41014a0
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 fcca9d8..767433d 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -3105,7 +3105,12 @@ void
gdk_x11_window_set_theme_variant_gtk_only (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]