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

[BUG]: Alt + (H/J/K/L) can still be used in monocle mode #819

Closed
rp1231 opened this issue May 11, 2024 · 13 comments
Closed

[BUG]: Alt + (H/J/K/L) can still be used in monocle mode #819

rp1231 opened this issue May 11, 2024 · 13 comments
Labels
bug Something isn't working

Comments

@rp1231
Copy link

rp1231 commented May 11, 2024

Describe the bug
Alt + (H/J/K/L) can still be used in monocle mode.
This produces visual artifacts of the window being focused.

To Reproduce
Steps to reproduce the behavior:

  1. Open two windows
  2. Enable monocle on one of them
  3. Press the shortcut to focus the other window
  4. The background window outline will be visible and sometimes even gain focus if you spam the shortcut

Expected behavior
Switch window focus keyboard shortcuts should be disabled while the monocle is enabled.

Screenshots and Videos
Add screenshots and videos to help explain your problem.

Operating System
OS Name: Microsoft Windows 11 Home
OS Version: 10.0.22631 N/A Build 22631

Additional context
Using the default keyboard shortcuts generated by komorebi.

@rp1231 rp1231 added the bug Something isn't working label May 11, 2024
@LGUG2Z LGUG2Z closed this as completed in e4bc74f May 12, 2024
@rp1231
Copy link
Author

rp1231 commented May 15, 2024

@LGUG2Z Thanks for implementing this but I am facing a problem.
Would it be possible to allow Alt+(H/J/K/L) for switching to windows on a different monitor, but just disable it for switching to windows on the same workspace?
Thanks

@LGUG2Z
Copy link
Owner

LGUG2Z commented May 15, 2024

I knew there was a reason this wasn't implemented in the first place, I just couldn't think of it 😅

I'm going to revert this commit; ALT+HJKL should work even in monocle mode, I think this is a case where the user needs to adapt to the software vs the software adapting to the user.

LGUG2Z added a commit that referenced this issue May 15, 2024
This commit ensures that directional focus commands are not processed
when a monocle container or maximized window is present on a workspace.

fix #819
@rp1231
Copy link
Author

rp1231 commented May 17, 2024

@LGUG2Z Thanks for implementing this.
But I was wondering if the monocle window should lose it's border when it's unfocused?
Right now, when I shift the focus to a window on my other monitor, the monocle window retains its border making it slightly confusing as to which window is focused.
Would love to hear your thoughts on this.

@LGUG2Z
Copy link
Owner

LGUG2Z commented May 17, 2024

I'll double check this on the master branch tomorrow; I don't think what you're describing should be an issue with the latest changes 🤞

LGUG2Z added a commit that referenced this issue May 17, 2024
This commit fixes a number of monocle container-related regressions.

* Monocle container on one monitor preventing border updates on another
* Cross-monitor focus changes towards a monitor w/ a monocle container
* Cross-monitor move towards a monitor w/ a monocle container

re #819
@LGUG2Z
Copy link
Owner

LGUG2Z commented May 17, 2024

Fixed this and a bunch of other monocle-related regressions ^

@rp1231
Copy link
Author

rp1231 commented May 17, 2024

Thanks this works great!
One last minor thing would be that If I

  1. Enable monocle on one screen
  2. Switch window focus to a window on another screen
  3. Switch window focus to the monocle
    A flash of the windows obfuscated by the monocle will be visible for a fraction of a second.
    Is this something that can be fixed?

LGUG2Z added a commit that referenced this issue May 17, 2024
This commit addresses two visual artifacts with monocle mode:

* Flashing of background windows when switching to a monocle container
  on another monitor is now gone
* Stackbars are automatically disabled whenever a container enters
  monocle mode

re #819
@LGUG2Z
Copy link
Owner

LGUG2Z commented May 17, 2024

Fixed this and another bug monocle-related bug ^

@rp1231
Copy link
Author

rp1231 commented May 18, 2024

Thanks, Works perfectly now!

@rp1231
Copy link
Author

rp1231 commented May 18, 2024

@LGUG2Z It works perfectly when switching from window to a monocle window.
But the visual artifacts still occur when switching from a workspace to a monocle workspace.

@rp1231
Copy link
Author

rp1231 commented May 18, 2024

Also one more bug:
When refocusing to a monocle from another window(on another monitor), only the border seems to focus the monocle not the actual window focus.
Hope I've explained that properly.

@LGUG2Z
Copy link
Owner

LGUG2Z commented May 18, 2024

The rendering bug should be fixed, I will take a look at the focus one a little later

LGUG2Z added a commit that referenced this issue May 18, 2024
This commit adds hiding and restoring of other containers on a workspace
with monocle on/off, and exits early when a monocle container is found
on workspace restores to avoid flashing of other containers before the
workspace focus operation completes.

Focus is also restored when focusing a monocle container on another
monitor as part of a cross-monitor focus operation.

The border rendering for monocle containers has also been tightened up.

re #819
@LGUG2Z
Copy link
Owner

LGUG2Z commented May 18, 2024

Focus is also fixed now (force-pushed the same commit)

@rp1231
Copy link
Author

rp1231 commented May 19, 2024

Thanks, This commit seems to have solved the focusing and rendering problems.

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