-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dragging the window by its top bar is unreliable with Qt6 #157
Comments
What desktop environment (KDE/GNOME/XFCE/some window manager) and graphical system (Xorg/Wayland) are you using? |
This was using i3 and Xorg. |
I was able to reproduce this under i3 (but not under more common window managers like KDE's kwin). The window gets stuck to the mouse and pressing escape returns it to the initial position. I'll see what I can do but can't promise much. The dragging action is implemented via Qt's Dragging using the floating modifier key, however, worked just fine. There's also no difference whether a compositing manager (like picom) is running or not. I also had my suspicions about the |
Thanks for looking into this. I just tried it on another machine using XFCE and the bug shows there as well. I will try and find some time to build a minimal QML app to reproduce this so it can be reported to Qt. |
WindowDragExample.zip |
Thank you very much! |
Reported to QT: https://bugreports.qt.io/browse/QTBUG-110145 Noteworthy: https://bugreports.qt.io/browse/QTBUG-102488 seems related but is C++ only, no QML and does work fine for me. |
Thanks for your effort. I don't have high hopes for them fixing it, but it's certainly worth a try. |
diff --git a/main.qml b/main.qml
index 11bb590..7020c93 100644
--- a/main.qml
+++ b/main.qml
@@ -17,9 +17,20 @@ Window {
visible: true
title: qsTr("Window Drag Example")
+ Timer {
+ id: dragTimer
+ }
+
+ function delayDrag(delayTime, cb) {
+ dragTimer.interval = delayTime;
+ dragTimer.repeat = false;
+ dragTimer.triggered.connect(cb);
+ dragTimer.start();
+ }
+
DragHandler {
target: null
- onActiveChanged: if(active) window.startSystemMove();
+ onActiveChanged: delayDrag(10, function() { if(active) window.startSystemMove(); });
}
Text {
I tried this as it seems like a race condition to me. It indeed improves the situation in the sense that releasing the window works reliably, but sometimes the window jumps around long after I released it, so it's more complex... |
While trying to switch the Debian package to Qt6, I noticed that moving the window by it's top bar is unreliable. It feels like the release event gets lost/ignored somewhere.
To Reproduce
Expected behavior
Window can be moved/dragged as expected.
Actual behavior
Window is stuck to the mouse pointer.
Additional troubleshooting
This can be reproduced easily and has been reproduced on two machines.
I also noticed the following detail: When releasing the mouse button for the first time, the cursor shape briefly turns back to the normal pointer and immediately switches back to the "movement cross".
qflipper-qt6-stuck-window.mp4
Additional context
A build against Qt5 (5.15.7) does not show this problem.
Log
The text was updated successfully, but these errors were encountered: