summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx')
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 6a0768388693..6a0df252fdbd 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -904,8 +904,11 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart,
Size( aCtrlRect.GetWidth()+2, aCtrlRect.GetHeight()+2) );
ControlCacheKey aControlCacheKey(nType, nPart, nState, aPixmapRect.GetSize());
- if (TryRenderCachedNativeControl(aControlCacheKey, aPixmapRect.Left(), aPixmapRect.Top()))
+ if (aControlCacheKey.canCacheControl()
+ && TryRenderCachedNativeControl(aControlCacheKey, aPixmapRect.Left(), aPixmapRect.Top()))
+ {
return true;
+ }
clipList aClip;
int nPasses = 0;