summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-05-23 21:37:25 +0200
committerJan Holesovsky <kendy@collabora.com>2015-05-24 02:14:40 +0200
commit2d40468efc1a90969d4ed34f699a8f48277cb8b3 (patch)
tree147f56fe5ac5cb0d32ab2aecf0f88c2bb4d07d11 /vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
parent1926cfb9386269b81b6ca62bdc64591f2c403d03 (diff)
rendercontext: Make the Gtk+ native widgets work with double-buffering.
Change-Id: Ic7101ab7cbaa7fd5f6b073a73ef0c0088b1af4c6
Diffstat (limited to 'vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx')
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index b4f1ba0ba346..6eb604300276 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -860,12 +860,9 @@ bool GtkSalGraphics::hitTestNativeControl( ControlType nType,
* aValue: An optional value (tristate/numerical/string)
* rCaption: A caption or title string (like button text etc)
*/
-bool GtkSalGraphics::drawNativeControl( ControlType nType,
- ControlPart nPart,
- const Rectangle& rControlRegion,
- ControlState nState,
- const ImplControlValue& aValue,
- const OUString& rCaption )
+bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart,
+ const Rectangle& rControlRegion, ControlState nState,
+ const ImplControlValue& aValue, const OUString& rCaption)
{
// get a GC with current clipping region set
GetFontGC();
@@ -891,7 +888,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType,
std::unique_ptr<GdkX11Pixmap> xPixmap;
std::unique_ptr<GdkX11Pixmap> xMask;
Rectangle aPixmapRect;
- if( ( bNeedPixmapPaint )
+ if ((bNeedPixmapPaint || (nState & ControlState::DOUBLEBUFFERING))
&& nType != CTRL_SCROLLBAR
&& nType != CTRL_SPINBOX
&& nType != CTRL_TAB_ITEM