Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.39k stars 166 forks source link

[Qt Wayland] Cuda existing window is not focused when you open text file #5514

Open pintassilgo opened 1 month ago

pintassilgo commented 1 month ago
  1. Wayland session.
  2. Launch Cuda Qt (both official Qt5 and Flatpak Qt6 are affected).
  3. Minimize Cuda and open a text file externally. For instance, by doubleclicking the file from desktop or from your file manager, or by terminal /path/to/cudatext "/path/to/textfile.txt".

Expected:

The already open Cuda window should jump to the front, displaying the file you opened.

Current:

The file opens, but Cuda window is not focused, you need to manually switch to it to read/edit.

Gtk is not affected.

I use KDE Plasma, but hopefully any DE running Wayland session is affected when you run Qt Cuda.

Currently, I run Cuda with QT_QPA_PLATFORM=xcb set to avoid this issue. By doing this, I'm launching Cuda as xwayland window instead of native Wayland, so I shouldn't do it. And Cuda xwayland has its own bugs like #5132.

pintassilgo commented 1 month ago

Is this one Lazarus bug too?

Alexey-T commented 1 month ago

I guess yes, I will try to make repro-demo later.

pintassilgo commented 1 month ago

Thanks.. Offtopic: did you forget to release 1.214.5.0 here on GitHub? I'm notified of Cuda updates though GitHub, but I happened to go to SourceForge then I realized I was using an outdated version.

Alexey-T commented 1 month ago

I made the release on GH now, thanks.

Alexey-T commented 1 month ago

Lazarus bugreport: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40956