Skip to content

Fix activity swtiching through UserActions menu (cherry pick)

David Edmundson requested to merge cherry-pick-a7520b36 into Plasma/5.25

On wayland the code to keep windows on the current activity whilst the window was broken was completely broken in porting. We only held the block for the duration of the method even though the popup remained open for longer.

On X11, when removing the window from the current activity it would not update correctly and remain visible. The code path was as follows:

  • the menu is shown an event loop is started
  • we change the activities
  • as we close the menu focus changes and workspace calls UserActionsMenu::close this unsets m_window
  • We then never call the blockActivityUpdates(false) at the end of UserActionsMenu::show

This patch addresses both at once.

We get rid of the nested event loop as that was always evil. This means slotWindowOperation no longer needs to be queued.

We perform cleanup of m_window and the activity blocker when the menu closes which should be safer.

BUG: 456873

(cherry picked from commit a7520b36)

Merge request reports