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+Tab/focus floating window spazzes out #53

Open
helmesjo opened this issue Jan 16, 2025 · 4 comments
Open

[BUG]: Alt+Tab/focus floating window spazzes out #53

helmesjo opened this issue Jan 16, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@helmesjo
Copy link

helmesjo commented Jan 16, 2025

Describe the bug
Running latest master (whkd 0.2.6) I noticed that when I have a floating window (komorebi) and Alt+Tab to it something reposition the pointer repeatedly to the center of the screen/that window. Since this appears to be event related (and whkd was the last thing I changed, installing from master), I suspect the problem to lie in here and from the looks of it I would guess the problem is that it keeps re-focusing the same window over and over.

To Reproduce

  1. Install latest master (from time of writing).
  2. Run komorebic start --whkd --bar (latter probably not important).
  3. Open a new window (should be tiled to fullscreen).
  4. Toggle to floating (hotkey or komorebic toggle-float).
  5. Alt+Tab (so just "re-select" the same window).
  6. It should now spaz out.
    • Toggle float again (only possible with hotkey at this point) and it stops spazzing.

Expected behavior
Sanity.

Screenshots and Videos
Image

Operating System

OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22621 N/A Build 22621

Additional context
alt + t: komorebi toggle-float

komorebi --version
komorebi 0.1.32
tag:v0.1.32
commit_hash:4b9d8114
build_time:2025-01-01 19:35:55 +00:00
build_env:rustc 1.83.0 (90b35a623 2024-11-26),stable-x86_64-pc-windows-msvc
@helmesjo helmesjo added the bug Something isn't working label Jan 16, 2025
@helmesjo helmesjo changed the title [BUG]: Short descriptive title [BUG]: Alt+Tab to floating window spazzes out Jan 16, 2025
@helmesjo helmesjo changed the title [BUG]: Alt+Tab to floating window spazzes out [BUG]: Alt+Tab/focus floating window spazzes out Jan 16, 2025
@LGUG2Z
Copy link
Owner

LGUG2Z commented Jan 16, 2025

Do you have masir running by any chance?

@helmesjo
Copy link
Author

Don't know what that is but no, there is no process running with that name.

@LGUG2Z
Copy link
Owner

LGUG2Z commented Jan 17, 2025

I'm not able to reproduct this at all and it's very unlikely that this is related to whkd; can you share your whkdrc file just in case? I can try reproducing with that.

@helmesjo
Copy link
Author

Sure:

.shell powershell

# Reload whkd configuration
# alt + o                 : taskkill /f /im whkd.exe && start /b whkd                      # if shell is cmd
alt + o                 : komorebic reload-configuration; taskkill /f /im whkd.exe; Start-Process whkd -WindowStyle hidden # if shell is pwsh / powershell
alt + shift + o         : cmd.exe /c "komorebic stop --whkd --bar && komorebic start --whkd --bar --clean-state"

# App shortcuts - these require shell to be pwsh / powershell
# The apps will be focused if open, or launched if not open
# alt + f                 : if ($wshell.AppActivate('Firefox') -eq $False) { start firefox }
# alt + b                 : if ($wshell.AppActivate('Chrome') -eq $False) { start chrome }
alt + return            : start "$env:APPDATA/Microsoft/Windows/Start Menu/Programs/alacritty.lnk"

alt + q                 : komorebic close
alt + shift + q         : powershell -executionpolicy bypass -File "$env:KOMOREBI_CONFIG_HOME/quit-focused-app.ps1"
alt + m                 : komorebic minimize

# Focus windows
alt + h                 : komorebic focus left
alt + j                 : komorebic focus down
alt + k                 : komorebic focus up
alt + l                 : komorebic focus right
alt + shift + oem_4     : komorebic cycle-focus previous     # oem_4 is [
alt + shift + oem_6     : komorebic cycle-focus next         # oem_6 is ]

# Move windows
alt + shift + h         : komorebic move left
alt + shift + j         : komorebic move down
alt + shift + k         : komorebic move up
alt + shift + l         : komorebic move right
alt + shift + return    : komorebic promote

# Stack windows
alt + ctrl + h          : komorebic stack left
alt + ctrl + j          : komorebic stack down
alt + ctrl + k          : komorebic stack up
alt + ctrl + l          : komorebic stack right
alt + oem_1             : komorebic unstack                  # oem_1 is ;
alt + oem_4             : komorebic cycle-stack previous     # oem_4 is [
alt + oem_6             : komorebic cycle-stack next         # oem_6 is ]

# Resize
alt + oem_plus          : komorebic resize-axis horizontal increase
alt + oem_minus         : komorebic resize-axis horizontal decrease
alt + shift + oem_plus  : komorebic resize-axis vertical increase
alt + shift + oem_minus : komorebic resize-axis vertical decrease

# Manipulate windows
alt + t                 : komorebic toggle-float
alt + shift + f         : komorebic toggle-monocle

# Window manager options
alt + shift + r         : komorebic retile
alt + p                 : komorebic toggle-pause

# Layouts
alt + x                 : komorebic flip-layout horizontal
alt + y                 : komorebic flip-layout vertical

# Workspaces
alt + 1                 : komorebic focus-workspace 0
alt + 2                 : komorebic focus-workspace 1
alt + 3                 : komorebic focus-workspace 2
alt + 4                 : komorebic focus-workspace 3
alt + 5                 : komorebic focus-workspace 4
alt + 6                 : komorebic focus-workspace 5
alt + 7                 : komorebic focus-workspace 6
alt + 8                 : komorebic focus-workspace 7

# Move windows across workspaces
alt + shift + 1         : komorebic move-to-workspace 0
alt + shift + 2         : komorebic move-to-workspace 1
alt + shift + 3         : komorebic move-to-workspace 2
alt + shift + 4         : komorebic move-to-workspace 3
alt + shift + 5         : komorebic move-to-workspace 4
alt + shift + 6         : komorebic move-to-workspace 5
alt + shift + 7         : komorebic move-to-workspace 6
alt + shift + 8         : komorebic move-to-workspace 7

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