diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-02-18 11:25:26 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-02-18 11:26:07 +0000 |
commit | d967cc35fd0c77d9f3dd0b3d0c7df850db6ec274 (patch) | |
tree | 4eb24ffea5dee094c72c569a5cfe5a83408bc992 /vcl | |
parent | f752a223d19fd52d4e1dd7defa3e134388458f18 (diff) |
Resolves: tdf#97904 opengl stuff isn't implemented for gtk3
Change-Id: I1abbceebadf320f28955f54058b2d0ebfc79b9bc
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/svdata.hxx | 1 | ||||
-rw-r--r-- | vcl/inc/unx/salinst.h | 2 | ||||
-rw-r--r-- | vcl/source/app/svapp.cxx | 9 | ||||
-rw-r--r-- | vcl/source/app/svmain.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/generic/app/salinst.cxx | 9 | ||||
-rw-r--r-- | vcl/unx/gtk/gtkinst.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/kde4/KDESalInstance.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/kde4/KDESalInstance.hxx | 2 |
8 files changed, 42 insertions, 2 deletions
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 628f45dcff8b..42df79e8d4b3 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -113,6 +113,7 @@ struct ImplSVAppData OUString* mpAppName; // Application name OUString* mpAppFileName; // Abs. Application FileName OUString* mpDisplayName; // Application Display Name + OUString* mpToolkitName; // Toolkit Name Help* mpHelp; // Application help PopupMenu* mpActivePopupMenu; // Actives Popup-Menu (in Execute) ImplIdleMgr* mpIdleMgr; // Idle-Manager diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h index ac90ca2718c9..85d7ff6bc704 100644 --- a/vcl/inc/unx/salinst.h +++ b/vcl/inc/unx/salinst.h @@ -45,7 +45,7 @@ protected: SalXLib *mpXLib; public: - X11SalInstance( SalYieldMutex* pMutex ) : SalGenericInstance( pMutex ), mpXLib(NULL) {} + explicit X11SalInstance(SalYieldMutex* pMutex); virtual ~X11SalInstance(); virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) override; diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 2ed5292eb121..10ad44198332 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1399,6 +1399,15 @@ void Application::SetDialogScaleX( short nScale ) pSVData->maGDIData.mnAppFontX += (pSVData->maGDIData.mnAppFontX*nScale)/100; } +OUString Application::GetToolkitName() +{ + ImplSVData* pSVData = ImplGetSVData(); + if ( pSVData->maAppData.mpToolkitName ) + return *(pSVData->maAppData.mpToolkitName); + else + return OUString(); +} + void Application::SetDefDialogParent( vcl::Window* pWindow ) { ImplGetSVData()->maWinData.mpDefDialogParent = pWindow; diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index c7bcb9191dcb..1546bc39af6c 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -504,6 +504,11 @@ void DeInitVCL() delete pSVData->maAppData.mpDisplayName; pSVData->maAppData.mpDisplayName = nullptr; } + if ( pSVData->maAppData.mpToolkitName ) + { + delete pSVData->maAppData.mpToolkitName; + pSVData->maAppData.mpToolkitName = nullptr; + } if ( pSVData->maAppData.mpEventListeners ) { delete pSVData->maAppData.mpEventListeners; diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx index 0ead21f1f7b6..c94f8007fd98 100644 --- a/vcl/unx/generic/app/salinst.cxx +++ b/vcl/unx/generic/app/salinst.cxx @@ -65,6 +65,15 @@ extern "C" } } +X11SalInstance::X11SalInstance(SalYieldMutex* pMutex) + : SalGenericInstance(pMutex) + , mpXLib(nullptr) +{ + ImplSVData* pSVData = ImplGetSVData(); + delete pSVData->maAppData.mpToolkitName; + pSVData->maAppData.mpToolkitName = new OUString("x11"); +} + X11SalInstance::~X11SalInstance() { // close session management diff --git a/vcl/unx/gtk/gtkinst.cxx b/vcl/unx/gtk/gtkinst.cxx index a1b752289137..a37102e0f30f 100644 --- a/vcl/unx/gtk/gtkinst.cxx +++ b/vcl/unx/gtk/gtkinst.cxx @@ -186,6 +186,14 @@ void GtkInstance::EnsureInit() InitAtkBridge(); + ImplSVData* pSVData = ImplGetSVData(); + delete pSVData->maAppData.mpToolkitName; +#if GTK_CHECK_VERSION(3,0,0) + pSVData->maAppData.mpToolkitName = new OUString("gtk3"); +#else + pSVData->maAppData.mpToolkitName = new OUString("gtk2"); +#endif + bNeedsInit = false; } diff --git a/vcl/unx/kde4/KDESalInstance.cxx b/vcl/unx/kde4/KDESalInstance.cxx index e28fb2d70328..86c9d8f2e50f 100644 --- a/vcl/unx/kde4/KDESalInstance.cxx +++ b/vcl/unx/kde4/KDESalInstance.cxx @@ -26,6 +26,14 @@ using namespace com::sun::star; +KDESalInstance::KDESalInstance(SalYieldMutex* pMutex) + : X11SalInstance(pMutex) +{ + ImplSVData* pSVData = ImplGetSVData(); + delete pSVData->maAppData.mpToolkitName; + pSVData->maAppData.mpToolkitName = new OUString("kde4"); +} + SalFrame* KDESalInstance::CreateFrame( SalFrame *pParent, SalFrameStyleFlags nState ) { return new KDESalFrame( pParent, nState ); diff --git a/vcl/unx/kde4/KDESalInstance.hxx b/vcl/unx/kde4/KDESalInstance.hxx index 8eabb3be8981..aaa8d2f46d5b 100644 --- a/vcl/unx/kde4/KDESalInstance.hxx +++ b/vcl/unx/kde4/KDESalInstance.hxx @@ -27,7 +27,7 @@ class SalFrame; class KDESalInstance : public X11SalInstance { public: - explicit KDESalInstance( SalYieldMutex* pMutex ) : X11SalInstance( pMutex ) {} + explicit KDESalInstance(SalYieldMutex* pMutex); virtual ~KDESalInstance() {} virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) override; |