From 64f0cbcd410c5618fec18cbd100084d727e2afff Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 22 Aug 2021 16:19:47 +0200 Subject: [PATCH] Fix property reply errors being coerced to 0 During a refactor this changed from a boolean to an option, guess I missed this. --- CHANGELOG.md | 4 +++- src/wine-host/xdnd-proxy.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac79785d..4e82d12d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,10 +29,12 @@ Versioning](https://semver.org/spec/v2.0.0.html). ### Fixed -- Fixed the drag-and-drop implementation now sending an `XdndStatus` message on +- Fixed the drag-and-drop implementation not sending an `XdndStatus` message on the very first tick. This fixes drag-and-drop from _Samplab_ which has a broken drag-and-drop implementation and only starts the operation after the left mouse button has already been released. +- Fixed the drag-and-drop implementation not properly handling errors caused by + the pointer being grabbed. This would only happen with _Samplab_. ### Packaging notes diff --git a/src/wine-host/xdnd-proxy.cpp b/src/wine-host/xdnd-proxy.cpp index b9479888..44ffc71e 100644 --- a/src/wine-host/xdnd-proxy.cpp +++ b/src/wine-host/xdnd-proxy.cpp @@ -609,7 +609,7 @@ std::optional WineXdndProxy::is_xdnd_aware( xcb_get_property_reply(x11_connection.get(), property_cookie, &error)); if (error) { free(error); - return false; + return std::nullopt; } // Since the spec dates from 2002, we won't even bother checking the