summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/sysdata.hxx6
-rw-r--r--vcl/source/window/mouse.cxx4
-rw-r--r--vcl/unx/generic/dtrans/X11_droptarget.cxx2
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx2
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx4
-rw-r--r--vcl/unx/gtk3/gtk3gtkobject.cxx2
6 files changed, 12 insertions, 8 deletions
diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx
index 49511985455e..458725d24033 100644
--- a/include/vcl/sysdata.hxx
+++ b/include/vcl/sysdata.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_VCL_SYSDATA_HXX
#define INCLUDED_VCL_SYSDATA_HXX
+#include <sal/types.h>
+
#include <vector>
#include <cstddef>
@@ -70,7 +72,9 @@ struct SystemEnvData
int nDepth; // depth of said visual
long aColormap; // the colormap being used
void* pAppContext; // the application context in use
- long aShellWindow; // the window of the frame's shell
+ // note: this is a "long" in Xlib *but* in the protocol it's only 32-bit
+ // however, the GTK3 vclplug wants to store pointers in here!
+ sal_IntPtr aShellWindow; // the window of the frame's shell
void* pShellWidget; // the frame's shell widget
const char* pToolkit; // the toolkit in use (gtk2 vs gtk3)
#endif
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index b47949d06446..516db21ed49f 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -748,9 +748,9 @@ Reference< css::datatransfer::dnd::XDragSource > Window::GetDragSource()
aDropTargetSN = "com.sun.star.datatransfer.dnd.X11DropTarget";
aDragSourceAL[ 0 ] = makeAny( Application::GetDisplayConnection() );
- aDragSourceAL[ 1 ] = makeAny( (sal_Size)(pEnvData->aShellWindow) );
+ aDragSourceAL[ 1 ] = makeAny(static_cast<sal_IntPtr>(pEnvData->aShellWindow));
aDropTargetAL[ 0 ] = makeAny( Application::GetDisplayConnection() );
- aDropTargetAL[ 1 ] = makeAny( (sal_Size)(pEnvData->aShellWindow) );
+ aDropTargetAL[ 1 ] = makeAny(static_cast<sal_IntPtr>(pEnvData->aShellWindow));
#endif
if( !aDragSourceSN.isEmpty() )
mpWindowImpl->mpFrameData->mxDragSource.set(
diff --git a/vcl/unx/generic/dtrans/X11_droptarget.cxx b/vcl/unx/generic/dtrans/X11_droptarget.cxx
index 413101f321e0..b6892ebe35ec 100644
--- a/vcl/unx/generic/dtrans/X11_droptarget.cxx
+++ b/vcl/unx/generic/dtrans/X11_droptarget.cxx
@@ -65,7 +65,7 @@ void DropTarget::initialize( const Sequence< Any >& arguments ) throw( css::uno:
if( m_pSelectionManager->getDisplay() ) // #136582# sanity check
{
- sal_Size aWindow = None;
+ sal_IntPtr aWindow = None;
arguments.getConstArray()[1] >>= aWindow;
m_pSelectionManager->registerDropTarget( aWindow, this );
m_aTargetWindow = aWindow;
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index bdf0867c2a4d..3a6eef7ad2c1 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1099,7 +1099,7 @@ void GtkSalFrame::InitCommon()
//system data
m_aSystemData.nSize = sizeof( SystemEnvData );
m_aSystemData.aWindow = GetNativeWindowHandle(m_pWindow);
- m_aSystemData.aShellWindow = reinterpret_cast<long>(this);
+ m_aSystemData.aShellWindow = reinterpret_cast<sal_IntPtr>(this);
m_aSystemData.pSalFrame = this;
m_aSystemData.pWidget = m_pWindow;
m_aSystemData.nScreen = m_nXScreen.getXScreen();
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 92ebb309725f..7c04b1d42a4d 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -734,7 +734,7 @@ void GtkDropTarget::initialize(const Sequence<Any>& rArguments) throw( Exception
static_cast<OWeakObject*>(this));
}
- sal_Size nFrame = 0;
+ sal_IntPtr nFrame = 0;
rArguments.getConstArray()[1] >>= nFrame;
if (!nFrame)
@@ -870,7 +870,7 @@ void GtkDragSource::initialize(const css::uno::Sequence<css::uno::Any >& rArgume
static_cast<OWeakObject*>(this));
}
- sal_Size nFrame = 0;
+ sal_IntPtr nFrame = 0;
rArguments.getConstArray()[1] >>= nFrame;
if (!nFrame)
diff --git a/vcl/unx/gtk3/gtk3gtkobject.cxx b/vcl/unx/gtk3/gtk3gtkobject.cxx
index b57c4dc86dae..039a4ba0a934 100644
--- a/vcl/unx/gtk3/gtk3gtkobject.cxx
+++ b/vcl/unx/gtk3/gtk3gtkobject.cxx
@@ -48,7 +48,7 @@ GtkSalObject::GtkSalObject( GtkSalFrame* pParent, bool bShow )
// system data
m_aSystemData.nSize = sizeof( SystemEnvData );
m_aSystemData.aWindow = pParent->GetNativeWindowHandle(m_pSocket);
- m_aSystemData.aShellWindow = reinterpret_cast<long>(this);
+ m_aSystemData.aShellWindow = reinterpret_cast<sal_IntPtr>(this);
m_aSystemData.pSalFrame = nullptr;
m_aSystemData.pWidget = m_pSocket;
m_aSystemData.nScreen = pParent->getXScreenNumber().getXScreen();