Wayland: Implement ridiculous workaround for broken dnd

Wayland is *the worst* window system I have ever had the
displeasure of trying to support.
This commit is contained in:
Kovid Goyal
2026-02-22 16:24:46 +05:30
parent 322a51da98
commit 9f2a4ad2dd
11 changed files with 50 additions and 26 deletions

3
glfw/input.c vendored
View File

@@ -1161,7 +1161,7 @@ _glfwFreeDragSourceData(void) {
}
GLFWAPI int
glfwStartDrag(GLFWwindow* handle, const GLFWDragSourceItem *items, size_t item_count, const GLFWimage* thumbnail, int operations) {
glfwStartDrag(GLFWwindow* handle, const GLFWDragSourceItem *items, size_t item_count, const GLFWimage* thumbnail, int operations, bool needs_toplevel_on_wayland) {
_GLFWwindow* window = (_GLFWwindow*) handle;
assert(window != NULL);
_GLFW_REQUIRE_INIT_OR_RETURN(EINVAL);
@@ -1188,6 +1188,7 @@ glfwStartDrag(GLFWwindow* handle, const GLFWDragSourceItem *items, size_t item_c
}
_glfw.drag.window_id = window->id;
_glfw.drag.operations = operations;
_glfw.drag.needs_toplevel_on_wayland = needs_toplevel_on_wayland;
int ans = _glfwPlatformStartDrag(window, thumbnail);
if (ans != 0) _glfwFreeDragSourceData();
return ans;