gdk: Don't set backgrounds on input-only windows
It doesn't make sense to allow a background on input-only windows, so instead of setting it and then never using it, we just don't ever set it.
This commit is contained in:
@ -6534,14 +6534,16 @@ gdk_window_set_background_pattern (GdkWindow *window,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||||
|
|
||||||
|
if (window->input_only)
|
||||||
|
return;
|
||||||
|
|
||||||
if (pattern)
|
if (pattern)
|
||||||
cairo_pattern_reference (pattern);
|
cairo_pattern_reference (pattern);
|
||||||
if (window->background)
|
if (window->background)
|
||||||
cairo_pattern_destroy (window->background);
|
cairo_pattern_destroy (window->background);
|
||||||
window->background = pattern;
|
window->background = pattern;
|
||||||
|
|
||||||
if (gdk_window_has_impl (window) &&
|
if (gdk_window_has_impl (window))
|
||||||
!window->input_only)
|
|
||||||
{
|
{
|
||||||
GdkWindowImplClass *impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
|
GdkWindowImplClass *impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
|
||||||
impl_class->set_background (window, pattern);
|
impl_class->set_background (window, pattern);
|
||||||
|
|||||||
Reference in New Issue
Block a user