Page 1 of 1

Linux Qt6 Text Selection Glitches in Wayland Sway Desktop

Posted: 02.01.2025 18:38
by Random Void User
udaText 1.220.5.0, linux-x86_64-qt6, fpc 3.2.3

I mainly want to use the Qt6 version for Wayland. The gtk2 version needs XWayland and uses an old version of GTK at that.

The Qt6 version generally works well. However text selection is off. Sometimes when I select a word, the entire word shift by practically 3-4 characters and it becomes impossible to get useful work done. It appears to me that the pixel calculations during text selection are wrong.

I have not debugged the issue beyond exploring various scale factors for Qt6. Nothing seems to help the issue. I know little about Qt internals. It could be an upstream problem, but I thought I should report it here. Thanks!

Code: Select all

QT_QPA_PLATFORM=wayland
QT_QPA_PLATFORMTHEME=qt6ct
QT_USE_PHYSICAL_DPI=0
XDG_SESSION_DESKTOP=sway
XDG_CURRENT_DESKTOP=sway

Re: Linux Qt6 Text Selection Glitches in Wayland Sway Desktop

Posted: 02.01.2025 19:06
by main Alexey
let's try existing options:

a: "unicode_proportional": false
b: "renderer_tweaks__linux":
----- add/remove char "w" (Use simplified calculation of average character width)
----- add/remove char "o" (Calculate 'offsets' for individual characters, ie use slower API to render)

restart app after each change in option.

Re: Linux Qt6 Text Selection Glitches in Wayland Sway Desktop

Posted: 02.01.2025 19:16
by main Alexey
if options don't help, tell me your OS distro name + version. i hope it is widespread OS installation so i don't need to setup stuff.

Re: Linux Qt6 Text Selection Glitches in Wayland Sway Desktop

Posted: 02.01.2025 21:20
by main Alexey

Re: Linux Qt6 Text Selection Glitches in Wayland Sway Desktop

Posted: 02.01.2025 21:42
by Random Void User
Removing 'w' fixed the issue, it appears. I changed nothing else.

So the current, fixed, working user.json has

Code: Select all

  "unicode_proportional": true,
  "renderer_tweaks": "wos",
  "renderer_tweaks__linux": "s",
  "renderer_tweaks__mac": "s",
Your support is fantastic! Thank you! I'll post again if I discover anything else. At first blush here, I am willing to say PROBLEM SOLVED.