Fix window drag on Wayland#902
Open
TheCodeSharman wants to merge 1 commit intoDreamSourceLab:masterfrom
Open
Conversation
On Wayland with Qt 6+, DSView runs as a native Wayland client rather than through XWayland. The custom title bar called move() directly to reposition the window, but Wayland compositors ignore move() calls from clients — window position is managed exclusively by the compositor. Fixed by detecting Wayland at runtime and calling QWindow::startSystemMove() instead, which sends the appropriate compositor request. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8b53f7e to
c9aeded
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the title bar drag issue that affects DSView when running as a native Wayland client with Qt 6+. Previously DSView ran through XWayland where this issue was hidden, but with Qt 6's improved Wayland support the app now runs natively and the problem is exposed.
QWidget::move()to reposition the window, which Wayland compositors silently ignore (clients cannot set their own window position). Fixed by detecting Wayland at runtime and callingQWindow::startSystemMove()instead, which delegates the move to the compositor via the correct Wayland protocol request.Platform
This issue does not affect Windows, macOS, or Linux users running DSView through XWayland.
Files changed
DSView/pv/toolbars/titlebar.cpp— added#include <QWindow>and Wayland-aware move handling inmousePressEventTest plan
Super+drag still works as expectedWAYLAND_DISPLAYunset orQT_QPA_PLATFORM=xcb)#ifndef _WIN32and runtime Wayland detection)