Skip to content

Modernize code to activate window on user activation

BEWARE: NOT TESTED MYSLEF, AS I HAVE NO MATRIX ACCOUNT. But code is tested in konversation, see Application::activateForStartLikeCall() in https://invent.kde.org/network/konversation/-/blob/master/src/application.cpp#L1389

KWindowSystem::updateStartupId() was only added now, KWINDOWSYSTEM_VERSION will only be 5.91 once KF version bump happened the WE when KF 5.90 is released. So for local testing you need to decrease to 5.90 while using latest kwindowsystem master.

  • use KWindowSystem::updateStartupId() for abstract update of X11 startup id or wayland activation token
  • call QWindow::raise() also for wayland to prepare when it will support it
  • call KWindowSystem::activateWindow() for all platforms, like done by other apps on user-triggered activation

@tfella @carlschwan

Merge request reports

Loading