Qalculate / qalculate-qt

GNU General Public License v2.0
365 stars 41 forks source link

If "Allow multiple instances" disabled, then make it focus and visible if trying to start dublicate #145

Open vini-nu opened 3 months ago

vini-nu commented 3 months ago

Very oftenly when I need calculator, I just press [Meta] and type "calc" and press Enter. I don't need multiple instances. But I don't close Qalculate either. If it was opened already and are minimized or behind other windows and I try to open Qalculate, it just ignores my command. Instead existing Qalculate instance could appear on top and on focus when I do that... Because that's exactly what this setting was suppost to do.


QT Qalculate, Arch, KDE Plasma 6.1, Wayland, Nvidia555

hanna-kn commented 3 months ago

It seems to be a Wayland issue.

The code below is used and works elsewhere

setWindowState((windowState() & ~Qt::WindowMinimized) | Qt::WindowActive);
raise();
activateWindow();