mate-desktop / marco

MATE default window manager
https://mate-desktop.org
GNU General Public License v2.0
192 stars 85 forks source link

workspace: ignore not_this_one if not in current workspace #768

Closed bitness closed 4 months ago

bitness commented 5 months ago

When the active workspace is changed, marco figures out which window should get focus by calling focus_ancestor_or_top_window. In some cases that call might include a window that should not get focus as not_this_one.

When not_this_one refers to a window, the function will check to see if it has a parent, and if it does, it will ignore the new workspace's mru_list and will focus that parent window. However, it doesn't check to see if the parent window is actually on the new workspace. If the parent isn't on the new workspace, focusing it will drag it over, including the transient window that was supposed to be ignored. This isn't the result a user would likely expect, and is made more confusing by the parent window being minimized, stuck that way until the user switches to another workspace and back.

This change makes focus_ancestor_or_top_window ignore the not_this_one window if it isn't on the new workspace's mru_list. Instead it will just search the new workspace's mru_list for a window to focus.

bitness commented 5 months ago

This PR should resolve issue #543 .

raveit65 commented 4 months ago

I do not use debian based distros with synaptics . I use fedora and other redhat family distros. With your python test file the dialog is only visible on the origin workspace. When i switch the workspace i do not see the open dialog. When switching back to origin workspace the open dialog is there. Honestly , i don't understand the issue and i have no idea to reproduce the steps-to-reproduce in report.

lukefromdc commented 4 months ago

No need to use Synaptic. Any similar dialog should do and the caja progress dialog was reported to act this way too. Yes I have seen that myself

bitness commented 4 months ago

We also use Red Hat-family distros. We found the issue while using the marco package in EPEL's el9 repository. I'm attaching a video here showing it happening while using that RPM on an EL9 workstation.

https://github.com/mate-desktop/marco/assets/318366/3a3b3dab-43c6-43ad-ad9c-34d24af00385

bitness commented 4 months ago

In the video, I'm first showing that the issue does not happen if the dialog does not have focus. Then the problem reproduces once I've focused the dialog.

raveit65 commented 4 months ago

OMG, it's been a long time a go that i switch workspaces without keyboard shortcut. :-) With using the mouse i see the issue. I will test your fix now.