retext-project / retext

ReText: Simple but powerful editor for Markdown and reStructuredText
GNU General Public License v2.0
1.88k stars 196 forks source link

Application doesn't moves to active virtual desktop where another file was opened #648

Closed toboil-features closed 1 month ago

toboil-features commented 2 months ago

I use KDE Plasma 6.1.4 https://github.com/user-attachments/assets/1a705f54-63d3-464a-8d42-849b7882b9a1

mitya57 commented 1 month ago

Sorry for the delayed response.

I think there is no standard API for this in Qt. Maybe X11 has some hacks for that but it will not work on Wayland or other platforms anyway.

I am currently using QWidget::raise() which raises the window on top of the stack. On my desktop this results in ReText window being shown in the list of windows in bold (see the screenshot below), and by clicking on that I get switched to the correct desktop. On other desktops like Plasma it may work differently, because the implementation is defined by desktop.

Screenshot

If there is some other method I can use, pointers would be helpful.