summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2017-09-25 14:00:31 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-10-25 03:23:14 +0200
commitb899ba17b83ca46ce198bb6c0d98cb735e6cefd1 (patch)
treeffdc56bbd46d56d53244c2e354f946e004c4be8f /vcl/unx
parent941373f56aabd5ee42615e7334a2c8ecb333fc92 (diff)
kde5: convert KDE5SalGraphics to SvpSalGraphics
Change-Id: Id30494fa1b01510e300f39b985b3a49ea58d81bc
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/kde5/KDE5SalFrame.cxx8
-rw-r--r--vcl/unx/kde5/KDE5SalFrame.hxx9
-rw-r--r--vcl/unx/kde5/KDE5SalGraphics.cxx9
-rw-r--r--vcl/unx/kde5/KDE5SalGraphics.hxx9
4 files changed, 28 insertions, 7 deletions
diff --git a/vcl/unx/kde5/KDE5SalFrame.cxx b/vcl/unx/kde5/KDE5SalFrame.cxx
index 73eb097bacc9..2419da16e4d4 100644
--- a/vcl/unx/kde5/KDE5SalFrame.cxx
+++ b/vcl/unx/kde5/KDE5SalFrame.cxx
@@ -351,8 +351,8 @@ void KDE5SalFrame::updateGraphics( bool bClear )
Drawable aDrawable = bClear ? None : GetWindow();
for( int i = 0; i < nMaxGraphics; i++ )
{
- if( m_aGraphics[i].bInUse )
- m_aGraphics[i].pGraphics->SetDrawable( aDrawable, GetScreenNumber() );
+ /*if( m_aGraphics[i].bInUse )
+ m_aGraphics[i].pGraphics->SetDrawable( aDrawable, GetScreenNumber() );*/
}
}
@@ -367,8 +367,8 @@ SalGraphics* KDE5SalFrame::AcquireGraphics()
m_aGraphics[i].bInUse = true;
if( ! m_aGraphics[i].pGraphics )
{
- m_aGraphics[i].pGraphics.reset( new KDE5SalGraphics );
- m_aGraphics[i].pGraphics->Init( this, GetWindow(), GetScreenNumber() );
+ m_aGraphics[i].pGraphics.reset( new KDE5SalGraphics( this, m_pWindow ) );
+ //m_aGraphics[i].pGraphics->Init( this, GetWindow(), GetScreenNumber() );
}
return m_aGraphics[i].pGraphics.get();
}
diff --git a/vcl/unx/kde5/KDE5SalFrame.hxx b/vcl/unx/kde5/KDE5SalFrame.hxx
index dc77ec6daae5..01539a458abe 100644
--- a/vcl/unx/kde5/KDE5SalFrame.hxx
+++ b/vcl/unx/kde5/KDE5SalFrame.hxx
@@ -25,6 +25,11 @@
#include <unx/salframe.h>
#include <unx/salgdi.h>
+#include "KDE5SalGraphics.hxx"
+
+class QWidget;
+class KDE5SalGraphics;
+
class KDE5SalFrame : public X11SalFrame
{
private:
@@ -32,7 +37,7 @@ class KDE5SalFrame : public X11SalFrame
struct GraphicsHolder
{
- std::unique_ptr<X11SalGraphics> pGraphics;
+ std::unique_ptr<KDE5SalGraphics> pGraphics;
bool bInUse;
GraphicsHolder() : bInUse( false ) {}
@@ -40,6 +45,8 @@ class KDE5SalFrame : public X11SalFrame
GraphicsHolder m_aGraphics[ nMaxGraphics ];
+ QWidget* m_pWindow;
+
public:
KDE5SalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle );
diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx
index 9419dff1e018..a22a695955e2 100644
--- a/vcl/unx/kde5/KDE5SalGraphics.cxx
+++ b/vcl/unx/kde5/KDE5SalGraphics.cxx
@@ -26,7 +26,7 @@
#undef Region
-#include "KDE5SalGraphics.hxx"
+#include "KDE5SalFrame.hxx"
#include "KDE5SalInstance.hxx"
#include <vcl/settings.hxx>
@@ -70,6 +70,13 @@ QRect region2QRect( const tools::Rectangle& rControlRegion )
return QRect(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.GetWidth(), rControlRegion.GetHeight());
}
+KDE5SalGraphics::KDE5SalGraphics( KDE5SalFrame *pFrame, QWidget *pWindow )
+ : SvpSalGraphics(),
+ m_pWindow( pWindow ),
+ m_pFrame( pFrame )
+{
+}
+
bool KDE5SalGraphics::IsNativeControlSupported( ControlType type, ControlPart part )
{
switch (type)
diff --git a/vcl/unx/kde5/KDE5SalGraphics.hxx b/vcl/unx/kde5/KDE5SalGraphics.hxx
index 811e4953c323..298d2100fe0f 100644
--- a/vcl/unx/kde5/KDE5SalGraphics.hxx
+++ b/vcl/unx/kde5/KDE5SalGraphics.hxx
@@ -24,15 +24,19 @@
#include <rtl/string.hxx>
#include <unx/saldisp.hxx>
#include <unx/salgdi.h>
+#include <headless/svpgdi.hxx>
#include <QtGui/QImage>
+class KDE5SalFrame;
+
/**
* Handles native graphics requests and performs the needed drawing operations.
*/
-class KDE5SalGraphics : public X11SalGraphics
+class KDE5SalGraphics : public SvpSalGraphics
{
public:
+ KDE5SalGraphics( KDE5SalFrame *pFrame, QWidget *pWindow);
virtual bool IsNativeControlSupported( ControlType, ControlPart ) override;
virtual bool hitTestNativeControl( ControlType, ControlPart,
@@ -46,6 +50,9 @@ public:
const OUString&, tools::Rectangle&, tools::Rectangle& ) override;
private:
+ QWidget *m_pWindow;
+ KDE5SalFrame *m_pFrame;
+
std::unique_ptr<QImage> m_image;
QRect lastPopupRect;
};