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

Window gets managed on wrong monitor #269

Open
ramirezmike opened this issue Apr 19, 2021 · 2 comments
Open

Window gets managed on wrong monitor #269

ramirezmike opened this issue Apr 19, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@ramirezmike
Copy link
Collaborator

Version (which release did you use?)
master

Describe the bug

This is mentioned in the README's Known Problems section.

To Reproduce
The problem is that the focus returns to the previous window after PowerLauncher closes, before spawning the new window.

  1. PowerLauncher opens
  2. You tell it to launch notepad for example
  3. PowerLauncher closes -> focus returns to previous application
  4. notepad launches

If the previous application mentioned in step 3 is managed by nog, the workspace will change to its grid. The only way to fix this (at least that I know of) is if we implement our own application launcher that is connected with nog.

Proposed Solution

What if we added a sort of "soft-monitor-lock" within nog.. like maybe a keybinding that you activate that then ignores focus events on other monitors from a focused-workspace perspective and then unlocks either by manually unlocking or by manually navigating to another workspace.

This would be like.. if you needed to open/close a single program multiple times on a monitor and don't want to keep jumping focus to another monitor when nothing is on your primary monitor. You could just "lock" the monitor so nog retains focus on the workspace on that monitor until you unlock it.

It's a little hacky but idk, maybe it could spark some ideas. Plus this issue could just be used to track this anyway.

@ramirezmike ramirezmike added the bug Something isn't working label Apr 19, 2021
@keepitsane
Copy link
Contributor

Another hacky approach could be to simply keep track of the monitor that is currently focused and unless there is a rule in the config file saying otherwise to automatically move the window to the last active monitor.

I feel like if a user has Nog in work mode they would expect it to have control over all the windows and where they spawn by default, and feel like adding additional keybindings might just make it more complicated and difficult to use then expected.

Just my opinion I don't mind either approach, but it would be nice to finally have this bug fixed as it does get annoying after a while 😄 .

@TimUntersberger
Copy link
Owner

I worked on a custom menu that has deep nog integration (Making it possible to easily run lua code) using iced.

It is almost done, the only thing missing are two ui/ux things that have to be fixed on the iced side (initial window position and resizing the application at runtime). This also showed that we could refactor our appbar to use iced instead making it cross platform per default and makes it possible to more easily customize the bar with more advanced features.

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

3 participants