ahrm / sioyek

Sioyek is a PDF viewer with a focus on textbooks and research papers
https://sioyek.info/
GNU General Public License v3.0
6.75k stars 219 forks source link

Weird dragging on text selection after switching to QMainWindow #1075

Open iamkroot opened 1 month ago

iamkroot commented 1 month ago

After https://github.com/ahrm/sioyek/commit/f7727a8e4e6af18ae631d5a2bfa4db1f1b4d3b39, I'm seeing extremely annoying behavior when selecting text. Essentially, if we drag on the empty portions of the page, instead of snapping the selection to text, it starts dragging the window.

See gif for before/after.

output (higher quality video link)

In the beginning, sioyek is on an old version. I switch to the build from bad commit at around 8 seconds.

Maybe there's a way to opt out of this dragging behavior at the Qt level?

ahrm commented 1 month ago

I think this maybe an interaction of QMainWindow with your window manager because I can't reproduce it on my machines. What window manager are you using here?

iamkroot commented 1 month ago

Hmm I'm using KWin on X11 (will report on Wayland in a bit).

Other than that, I'm also running Kvantum. That has a setting called "Drag from:" with the options "Titlebar", "Menubar", "Menubar and primary toolbar", and "Anywhere". I've set it to "Menubar and primary toolbar".

Will check if it is something to do with Kvantum.