Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows change workspaces after suspend #29

Closed
HadiModarres opened this issue May 9, 2019 · 24 comments
Closed

Windows change workspaces after suspend #29

HadiModarres opened this issue May 9, 2019 · 24 comments

Comments

@HadiModarres
Copy link

This extension is very nice, but there is a problem that makes it unusable for me. After waking up from suspend window positions change.

To reproduce: create a 3x3 matrix and open a terminal in bottom right corner, suspend then terminal position is changed.

@ebeem
Copy link
Collaborator

ebeem commented May 9, 2019

can you explain what position changes?
do you mean the window moves to another workspace?
or the window moves to another monitor?
or just position on the screen?

@HadiModarres
Copy link
Author

Hi @ebeem
yes the window moves to another workspace, I tried it many times and thats the case, haven't tried with different monitors

@ebeem
Copy link
Collaborator

ebeem commented May 9, 2019

I will need to debug this, as far as I am concerned, it didn't happen to me before. I use 3x3 grid.
I will try this and let you know

@HadiModarres
Copy link
Author

Cool :)

@mzur
Copy link
Owner

mzur commented May 10, 2019

@HadiModarres Do you use a laptop with an external monitor? There might be a delay in setting up the external monitor which pushes the windows back to the workspaces of the internal monitor. I believe this issue is not caused by Workspace Matrix because it has nothing to do with window positioning. It might only increase the visibility of this issue with the 2D grid and static number of workspaces.

@HadiModarres
Copy link
Author

Hi @mzur
Yes I have my laptop connected to a single external monitor. I tested many times, and what you said is in fact true. The problem isnt there when I only work with laptop screen. Thats unfortunate, because it would be so good for me to dedicate each row to one my tasks, it just fits my workflow so well. So theres nothing that can be done? I'd be happy to help if you point me in the right direction

@HadiModarres
Copy link
Author

@mzur just to be clear, external monitor doesnt cause an issue on its own. I can work with it with no problems and detach and attach the hdmi cable many times. The issue happens only when I suspend the laptop and wake it up again.

@HadiModarres
Copy link
Author

actually, I can't reproduce it anymore, it works well with laptop or external monitor. It may have been caused by a conflict with another extension. I'll close this now, Ill open it again if I find it.

Thanks @mzur @ebeem

@s3than
Copy link

s3than commented May 20, 2019

I don't use an external monitor and can replicate this issue
When I lock screen, whatever was in focus will be moved to the bottom left corner of a 2x2 workspace matrix

Actually it appears to only move the bottom from right to left, neither of the items in 1 or 2 move see below

1,2
3,4

1 has app, 2 has app
3 is empty, 4 has app

Lock screen

  1. has app (no change), 2 has app (no change)
    3 has app, 4 is empty

@HadiModarres
Copy link
Author

you're right, I'm seeing this behaviour too
there is something wrong with handling of empty of workspaces after attaching to external monitor or locking/suspending

@HadiModarres HadiModarres reopened this May 20, 2019
@mzur
Copy link
Owner

mzur commented May 21, 2019

I still can't reproduce this with Ubuntu 18.04 and GNOME 3.28.3 or Ubuntu 19.04 and GNOME 3.32.0. Which Linux distro and GNOME version do you have?

@ebeem
Copy link
Collaborator

ebeem commented May 21, 2019

@s3than
what about restarting gnome (alt+f2 and type r)? does it move the windows?
do you use other extensions that can affect this?

I use the Auto Move Windows extension which allows me to set a default workspace for each application, if I set firefox default workspace to 3 and then move it to 4, then restart/suspend/add monitor, the window will move back to workspace 3.
could it be that you have a similar scenario like this one?

can you try placing multiple windows on each workspace and tell us whether all windows at workspace#4 move to workspace#3?

@s3than
Copy link

s3than commented May 22, 2019

@ebeem I don't have any extensions for moving windows
@mzur I'm running ubuntu 19.04, GNOME Shell 3.32.0 (ubuntu mode)

I'm having a hard time replicating again after that first day.

I'll continue testing and advise.

@HadiModarres
Copy link
Author

Could it be because of the first install and it gets fixed after a restart?

@s3than
Copy link

s3than commented May 22, 2019

@HadiModarres That's possible, I'll keep testing I've got two laptops with the same versions installed so I can try and replicate on them at the same time

@mzur mzur added the needs info Needs more information to continue label May 22, 2019
@mzur
Copy link
Owner

mzur commented Jul 27, 2019

Please reopen if this is still relevant.

@mzur mzur closed this as completed Jul 27, 2019
@FOSSforlife
Copy link

FOSSforlife commented Jul 31, 2019

I'm experiencing this issue. 3x2 grid and I'm running the latest Manjaro with GNOME 3.32.

On mine, all of the windows on workspaces 4-6 move to workspace 3.

@mzur mzur reopened this Jul 31, 2019
@HadiModarres
Copy link
Author

I think this is Gnome/Xorg issue, I don't have the plugin installed currently but I see this problem sometimes. It happens every once in a while with a mixture of external screen and suspending.
Thought this would help you in the right direction.

Haven't encountered the problem on Wayland so far.

@mzur
Copy link
Owner

mzur commented Jul 31, 2019

So this also happens if Workspace Matrix is not installed/disabled? @FOSSforlife Can you confirm this?

@ebeem
Copy link
Collaborator

ebeem commented Jul 31, 2019

I made some assumptions and tested wsmatrix, it looks like disabling/enabling the extension (which happens on suspend and when gnome becomes idle for a long time) resets old configuration (without wsmatrix) and then overrides it with wsmatrix's configuration.

in case someone has let's say 6 workspaces by default, and 9 with wsmatrix, all windows from workspaces 7, 8, and 9 will move to workspace 6, since the default configuration will be restored and gnome will have to relocate windows on workspaces that do not exist anymore.

I am not sure whether this should be fixed in wsmatrix or not, I think the current behavior makes sense. a workaround to fix this issue is to set workspaces to static and number of workspace to the number u desire.

steps:

  1. go to gnome tweaks, and disable wsmatrix
  2. from gnome tweaks, go to workspaces, select the option Static Workspaces and set the Number of Workspaces (must be the same number as wsmatrix's workspaces)
  3. enable wsmatrix

if anyone is facing this issue, please try this solution and let us know if it works.

@mzur
Copy link
Owner

mzur commented Jul 31, 2019

Thanks a lot @ebeem! This makes sense and I can reproduce the behavior. One thing we could do is to not restore the number of workspaces if the extension is disabled. This should at least solve the issue if the workspaces were set to "static". I'll have to test what happens in case they were set to "dynamic".

@ebeem
Copy link
Collaborator

ebeem commented Jul 31, 2019

I assume dynamic is fine since it will not get rid of the extra workspaces
and yes, I agree with not restoring the number of workspaces as a solution. Changing the number of workspaces in wsmatrix should also change gnome's number of workspaces.

@FOSSforlife
Copy link

@ebeem's solution worked for me. When I went to Tweaks -> Workspaces, it said that I had 6 workspaces, which is the amount I should have, but after turning off Workspace Matrix extension it went down to 3. Turning the extension off, changing it, and then turning it back on worked. Thank you all for your help!

@mzur mzur removed the needs info Needs more information to continue label Aug 7, 2019
mzur added a commit that referenced this issue Aug 7, 2019
The extension is disabled when GNOME is inactive or locked and
the reset of workspaces caused windows to move from one workspace
to the other. Now changing the number of workspaces in this extension
will permanently change the global number of workspaces.

If workspaces were set to "dynamic" before the extension is enabled,
windows will still jump around.

References #29
@mzur
Copy link
Owner

mzur commented Aug 7, 2019

I just published v2.3.0 which resolves this issue if workspaces were set to "static". If they were set to "dynamic", windows will still jump around. I'll leave it at that for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants