Commit 49a8a354 authored by Nicolas Fella's avatar Nicolas Fella Committed by Ingo Klöcker
Browse files

Fix raising main window

Call KWindowSystem::updateStartupId, otherwise raising doesn't work because of focus stealing prevention

Use KWindowSystem::activateWindow to make it work on Wayland

Remove special handling for minimized windows. It breaks raising minimized windows that are behind another window. Activating unminimizes a window anyway
parent 47b723e3
Pipeline #254657 failed with stage
in 3 minutes and 44 seconds
......@@ -619,11 +619,9 @@ void KleopatraApplication::setMainWindow(MainWindow *mainWindow)
static void open_or_raise(QWidget *w)
{
if (w->isMinimized()) {
KWindowSystem::unminimizeWindow(w->winId());
w->raise();
} else if (w->isVisible()) {
w->raise();
if (w->isVisible()) {
KWindowSystem::updateStartupId(w->windowHandle());
KWindowSystem::activateWindow(w->windowHandle());
} else {
w->show();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment