summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>2014-12-03 17:04:15 -0500
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-12-15 19:53:35 +0100
commit74f71a70ea2f0bf71b4110bde500515314a17ab0 (patch)
tree58ebc38a131b2b6f5bc91251651c55b5579e0056
parentf78f83cb0185c7d8ecb4fd46d00a9a5a4290ad71 (diff)
vcl: Use right size to draw native GTK window background
Change-Id: Id446d20599f072f657c6106d6c6457fce08830e6
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index f3b1ecf6f9fe..2c6036b13f5b 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1551,13 +1551,11 @@ bool GtkSalGraphics::NWPaintGTKFrame(
bool GtkSalGraphics::NWPaintGTKWindowBackground(
GdkDrawable* gdkDrawable,
ControlType, ControlPart,
- const Rectangle& /* rControlRectangle */,
+ const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState /* nState */, const ImplControlValue&,
const OUString& )
{
- int w,h;
- gtk_window_get_size(GTK_WINDOW(m_pWindow),&w,&h);
GdkRectangle clipRect;
for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
@@ -1566,7 +1564,12 @@ bool GtkSalGraphics::NWPaintGTKWindowBackground(
clipRect.width = it->GetWidth();
clipRect.height = it->GetHeight();
- gtk_paint_flat_box(m_pWindow->style,gdkDrawable,GTK_STATE_NORMAL,GTK_SHADOW_NONE,&clipRect,m_pWindow,"base",0,0,w,h);
+ gtk_paint_flat_box(m_pWindow->style,gdkDrawable,GTK_STATE_NORMAL,GTK_SHADOW_NONE,&clipRect,
+ m_pWindow,"base",
+ rControlRectangle.Left(),
+ rControlRectangle.Top(),
+ rControlRectangle.GetWidth(),
+ rControlRectangle.GetHeight());
}
return true;