diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-08-31 21:08:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-02 00:35:28 +0200 |
commit | d9527fd01fd2674deb6868084d056861db5447fa (patch) | |
tree | 4ab724a7c1d8e5b7c9e825eb3475986f50b766e4 | |
parent | 3814952f0be80afddcfda7f0e65bb602ed75438c (diff) |
remove some casting
Change-Id: Idf6c82b0c609d8680e2017602bfe9a93acb093b9
Reviewed-on: https://gerrit.libreoffice.org/41807
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | include/vcl/sysdata.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/unx/gtk/gtkframe.hxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/gtkdata.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk/gtksalframe.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkframe.cxx | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx index ae9e57f0344c..fba387e01b87 100644 --- a/include/vcl/sysdata.hxx +++ b/include/vcl/sysdata.hxx @@ -64,7 +64,7 @@ struct SystemEnvData // Nothing #elif defined( UNX ) void* pDisplay; // the relevant display connection - long aWindow; // the window of the object + sal_uIntPtr aWindow; // the window of the object void* pSalFrame; // contains a salframe, if object has one void* pWidget; // the corresponding widget void* pVisual; // the visual in use diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index 1a536795f403..772033b49b76 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -55,7 +55,7 @@ class GtkSalGraphics; class GtkSalDisplay; #if GTK_CHECK_VERSION(3,0,0) -typedef ::Window GdkNativeWindow; +typedef sal_uIntPtr GdkNativeWindow; #define GDK_WINDOW_XWINDOW(o) GDK_WINDOW_XID(o) #define gdk_set_sm_client_id(i) gdk_x11_set_sm_client_id(i) #define gdk_window_foreign_new_for_display(a,b) gdk_x11_window_foreign_new_for_display(a,b) diff --git a/vcl/unx/gtk/gtkdata.cxx b/vcl/unx/gtk/gtkdata.cxx index 29f7d33be75e..afc0aa8c7dce 100644 --- a/vcl/unx/gtk/gtkdata.cxx +++ b/vcl/unx/gtk/gtkdata.cxx @@ -146,7 +146,7 @@ GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* sys_event ) it != m_aFrames.end(); ++it ) { GtkSalFrame* pFrame = static_cast<GtkSalFrame*>(*it); - if( (GdkNativeWindow)pFrame->GetSystemData()->aWindow == pEvent->xany.window || + if( pFrame->GetSystemData()->aWindow == pEvent->xany.window || ( pFrame->getForeignParent() && pFrame->getForeignParentWindow() == pEvent->xany.window ) || ( pFrame->getForeignTopLevel() && pFrame->getForeignTopLevelWindow() == pEvent->xany.window ) ) @@ -216,7 +216,7 @@ bool GtkSalDisplay::Dispatch( XEvent* pEvent ) for( std::list< SalFrame* >::const_iterator it = m_aFrames.begin(); it != m_aFrames.end(); ++it ) { - if( (GdkNativeWindow)(*it)->GetSystemData()->aWindow == pEvent->xany.window ) + if ((*it)->GetSystemData()->aWindow == pEvent->xany.window) return static_cast<GtkSalFrame*>(*it)->Dispatch( pEvent ); } } diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index e64f68266d01..b8cac669deb4 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -1250,7 +1250,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle ) } } -GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow aWindow ) +GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow(GdkNativeWindow aWindow) { ::Window aRoot, aParent; ::Window* pChildren; @@ -1282,9 +1282,9 @@ GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow aWindow ) void GtkSalFrame::Init( SystemParentData* pSysData ) { m_pParent = nullptr; - m_aForeignParentWindow = (GdkNativeWindow)pSysData->aWindow; + m_aForeignParentWindow = pSysData->aWindow; m_pForeignParent = nullptr; - m_aForeignTopLevelWindow = findTopLevelSystemWindow( (GdkNativeWindow)pSysData->aWindow ); + m_aForeignTopLevelWindow = findTopLevelSystemWindow(pSysData->aWindow); m_pForeignTopLevel = gdk_window_foreign_new_for_display( getGdkDisplay(), m_aForeignTopLevelWindow ); gdk_window_set_events( m_pForeignTopLevel, GDK_STRUCTURE_MASK ); diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 1b17ef67bf0d..1d43d1999811 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -1271,9 +1271,9 @@ GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow ) void GtkSalFrame::Init( SystemParentData* pSysData ) { m_pParent = nullptr; - m_aForeignParentWindow = (GdkNativeWindow)pSysData->aWindow; + m_aForeignParentWindow = pSysData->aWindow; m_pForeignParent = nullptr; - m_aForeignTopLevelWindow = findTopLevelSystemWindow( (GdkNativeWindow)pSysData->aWindow ); + m_aForeignTopLevelWindow = findTopLevelSystemWindow(pSysData->aWindow); m_pForeignTopLevel = gdk_window_foreign_new_for_display( getGdkDisplay(), m_aForeignTopLevelWindow ); gdk_window_set_events( m_pForeignTopLevel, GDK_STRUCTURE_MASK ); |