diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-05-24 01:04:07 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-05-24 02:14:40 +0200 |
commit | 70bdecd7f0b423734d1b9042141b58180032caf9 (patch) | |
tree | 6bdb9c106b02beb64a0d8a28fb09d50bc783a4eb /vcl | |
parent | 2d40468efc1a90969d4ed34f699a8f48277cb8b3 (diff) |
rendercontext: Fix border window's painting to work well with rendercontext.
This partially fixes rendering of comboboxes.
Change-Id: I243f63a0cd83bb435876d3954a073df0acd54c58
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/brdwin.cxx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index f35998c59248..0d6ab4edab21 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -637,16 +637,11 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, s bool bNativeOK = false; // for native widget drawing we must find out what // control this border belongs to - // FIXME RenderContext - ultimately we'll need to get rid of the - // vcl::Window here to get native widgets here - vcl::Window* pWin = NULL; - vcl::Window* pCtrl = NULL; - if (rRenderContext.GetOutDevType() == OUTDEV_WINDOW) - pWin = static_cast<vcl::Window*>(&rRenderContext); + vcl::Window* pCtrl = mpBorderWindow->GetWindow(GetWindowType::Client); ControlType aCtrlType = 0; ControlPart aCtrlPart = PART_ENTIRE_CONTROL; - if (pWin && (pCtrl = mpBorderWindow->GetWindow(GetWindowType::Client)) != NULL) + if (pCtrl) { switch (pCtrl->GetType()) { @@ -714,9 +709,9 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, s ImplControlValue aControlValue; ControlState nState = ControlState::ENABLED; - if (!pWin->IsEnabled()) + if (!mpBorderWindow->IsEnabled()) nState &= ~ControlState::ENABLED; - if (pWin->HasFocus()) + if (mpBorderWindow->HasFocus()) nState |= ControlState::FOCUSED; else if(mbNWFBorder) { @@ -782,7 +777,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, s if (nBorderStyle & WindowBorderStyle::MENU) nFlags |= DrawFrameFlags::Menu; // tell DrawFrame that we're drawing a window border of a frame window to avoid round corners - if (pWin && pWin == pWin->ImplGetFrameWindow()) + if (mpBorderWindow == mpBorderWindow->ImplGetFrameWindow()) nFlags |= DrawFrameFlags::WindowBorder; DecorationView aDecoView(&rRenderContext); |