Make gdk_x11_window_set_theme_variant do nothing for non-toplevels

This avoids problems when calling this e.g. on offscreen windows.
This commit is contained in:
Matthias Clasen 2011-04-03 17:40:37 -04:00
parent 2226996b80
commit d46f0db38b

View File

@ -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)
{