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

Moving a window to a different workspace no longer auto focuses the new workspace #274

Open
keepitsane opened this issue Jun 21, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@keepitsane
Copy link
Contributor

Version (which release did you use?)
Pinning

Describe the bug
Using the in_move_to_ws(ws_id) used to also change the current active workspace to the provided ws_id. Now if I have a window on workspace 1 open on monitor 1 and move it to workspace 2 that is open on monitor 2, the window doesn't display on workspace 2 until I manually change my focus to it.

I can actually see both the current functionality and old functionality, both useful so maybe it can be introduced as an option? But regardless I think that when a window gets moved to a workspace that workspace should be refreshed to update the windows.

@keepitsane keepitsane added the bug Something isn't working label Jun 21, 2021
@ramirezmike
Copy link
Collaborator

I believe this was changed during the lua switch partially related to #263

You can get the old behavior if you do something like this since it's kinda a combination of ws_change and win_move_to_ws:

nog.nbind("alt+shift+1", function ()
    nog.win_move_to_ws(1)
    nog.ws_change(1)
end)

@keepitsane
Copy link
Contributor Author

keepitsane commented Jun 22, 2021

Thanks that works perfectly. Here is the function I made so that you don't need to add a keybind for each workspace manually.

local workspaces = {1, 2, 3, 4, 5, 6, 7, 8, 9}

nog.nbind_tbl("alt+shift", function (id)
    nog.win_move_to_ws(id)
    nog.ws_change(id)
end, workspaces)

@keepitsane
Copy link
Contributor Author

I guess one issue that I think may still exist in the current implementation is the multi monitor support. When I move a window to a workspace that is open on a separate monitor even if that workspace isn't focused the moved window doesn't display until I manually focus. I feel it should still refresh the grid even if it doesn't follow the window.

@keepitsane keepitsane reopened this Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants