[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl' - 2 commits - vcl/inc vcl/unx
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Mon Oct 27 13:07:07 PDT 2014
vcl/inc/unx/gtk/gtkframe.hxx | 5 ++++-
vcl/unx/generic/gdi/salgdi.cxx | 2 +-
vcl/unx/gtk/window/gtksalframe.cxx | 5 +++++
3 files changed, 10 insertions(+), 2 deletions(-)
New commits:
commit 5776ab7107d4e0692c6945c9a309406581349421
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Mon Oct 27 21:08:06 2014 +0100
implement X11WindowProvider for GtkSalFrame
Change-Id: Id763f9b69f4d4476a3b6401bb83e2bf173248e8a
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 93a7f1d..c10f0b5 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -33,6 +33,7 @@
#include <salframe.hxx>
#include <vcl/sysdata.hxx>
+#include <unx/x11windowprovider.hxx>
#include <unx/saltype.h>
#include "tools/link.hxx"
@@ -58,7 +59,7 @@ typedef ::Window GdkNativeWindow;
typedef void GDBusConnection;
#endif
-class GtkSalFrame : public SalFrame
+class GtkSalFrame : public SalFrame, public X11WindowProvider
{
static const int nMaxGraphics = 2;
@@ -445,6 +446,8 @@ public:
static GtkSalFrame *getFromWindow( GtkWindow *pWindow );
virtual void damaged (const basegfx::B2IBox& rDamageRect);
+
+ virtual Window GetX11Window() SAL_OVERRIDE;
};
#define OOO_TYPE_FIXED ooo_fixed_get_type()
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index b39875f..03cf9df 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -4508,4 +4508,9 @@ Size GtkSalDisplay::GetScreenSize( int nDisplayScreen )
return Size( aRect.GetWidth(), aRect.GetHeight() );
}
+Window GtkSalFrame::GetX11Window()
+{
+ return widget_get_xid(m_pWindow);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 605971da3ac6e915d572b5729dcc90f693bc0846
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Mon Oct 27 20:42:59 2014 +0100
fix stupid typo
Change-Id: I119503d3057afbfa3e04ce7736fed966a414b9b9
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 9b23a64..caa7b1c 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -157,7 +157,7 @@ void X11SalGraphics::SetDrawable( Drawable aDrawable, SalX11Screen nXScreen )
OpenGLSalGraphicsImpl* pOpenGLImpl = dynamic_cast<OpenGLSalGraphicsImpl*>(mpImpl.get());
if (pOpenGLImpl && m_pFrame && dynamic_cast<X11WindowProvider*>(m_pFrame))
{
- Window aWin = dynamic_cast<X12WindowProvider*>(m_pFrame)->GetX11Window();
+ Window aWin = dynamic_cast<X11WindowProvider*>(m_pFrame)->GetX11Window();
pOpenGLImpl->GetOpenGLContext().init(GetXDisplay(),
aWin, m_nXScreen.getXScreen());
}
More information about the Libreoffice-commits
mailing list