summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-10-21 17:41:53 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-10-22 08:06:15 +0200
commit5d422c0348efd1df6b3d44dd6efcf5c5490fc321 (patch)
tree5e52ab80f83161e8dc4bb3960dc63aa94bc99883
parent2976590ed9f727c24064c97d80a51e9891253119 (diff)
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. <https://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html>, 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. <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/blob/master/include/X11/ Xdefs.h>.) 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<sal_uIntPtr>(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 <sbergman@redhat.com>
-rw-r--r--include/vcl/sysdata.hxx2
1 files changed, 1 insertions, 1 deletions
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