From 5d422c0348efd1df6b3d44dd6efcf5c5490fc321 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 21 Oct 2020 17:41:53 +0200 Subject: Revert "sal_uIntPtr->unsigned long in SystemEnvData" This reverts commit c0f1d211eff5f89f5c9298743f6e7d91d187b799, which states that it changed the type of UNX-only SystemEnvData::aWindow from sal_uIntPtr to unsigned long "to match the type used by X11". (And while resource IDs used for windows etc. are apparently 32-bit in the X11 protocol, see e.g. , Xlib and the underlying /usr/include/X11/Xdefs.h indeed appear to be somewhat confused whether the typedef for XID should be unsigned long (presumably stemming from times when long was universally 32-bit) or CARD32, see e.g. .) But at least for GTK3/Wayland, the sal_uIntPtr values returned by GtkSalFrame::GetNativeWindowHandle (in vcl/unx/gtk3/gtk3gtkframe.cxx, and which are stored in SystemEnvData::aWindow in GtkSalFrame::InitCommon, vcl/unx/gtk3/gtk3gtkframe.cxx, and GtkSalObjectBase::Init, vcl/unx/gtk3/gtk3gtkobject.cxx) as > return reinterpret_cast(gdk_wayland_window_get_wl_surface(pWindow)); are struct wl_surface* values, so sal_uIntPtr looks like the overall more appropriate type after all. (The part of c0f1d211eff5f89f5c9298743f6e7d91d187b799 that dropped the somewhat needless C-style-cast converting aWindow from sal_uIntPtr to sal_IntPtr in SystemChildWindow::GetParentWindowHandle, vcl/source/window/syschild.cxx, has not been reverted, though.) Change-Id: I8fea062126eacd2d6dc44dab14d5240c4b9946e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104639 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- include/vcl/sysdata.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/vcl/sysdata.hxx') diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx index 14685c3b9d61..0957f5cc11a7 100644 --- a/include/vcl/sysdata.hxx +++ b/include/vcl/sysdata.hxx @@ -62,7 +62,7 @@ struct SystemEnvData enum class Platform { Wayland, Xcb }; void* pDisplay; // the relevant display connection - unsigned 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 -- cgit