Use uint64_t for X Window handle
Fixed: dawn:2245
Change-Id: I1a94f5058a8eac6f8e66206a581254c990d2ab31
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/162082
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/dawn.json b/dawn.json
index b51706b..4a51c93 100644
--- a/dawn.json
+++ b/dawn.json
@@ -3186,7 +3186,7 @@
"tags": ["native"],
"members": [
{"name": "display", "type": "void", "annotation": "*"},
- {"name": "window", "type": "uint32_t"}
+ {"name": "window", "type": "uint64_t"}
]
},
"surface descriptor from wayland surface": {
diff --git a/src/dawn/native/Surface.cpp b/src/dawn/native/Surface.cpp
index 5fd1801..727f538 100644
--- a/src/dawn/native/Surface.cpp
+++ b/src/dawn/native/Surface.cpp
@@ -172,7 +172,7 @@
x11->xSetErrorHandler([](Display*, XErrorEvent*) { return 0; });
XWindowAttributes attributes;
int status = x11->xGetWindowAttributes(reinterpret_cast<Display*>(xDesc->display),
- xDesc->window, &attributes);
+ static_cast<Window>(xDesc->window), &attributes);
x11->xSetErrorHandler(oldErrorHandler);
DAWN_INVALID_IF(status == 0, "Invalid X Window");