dado3212 / spaces-renamer

💻 Ability to rename desktop spaces on macOS 10.10+
MIT License
1.03k stars 29 forks source link

"Flickering" input window #99

Closed jvthomas90 closed 2 weeks ago

jvthomas90 commented 1 month ago

Describe the bug
It seems that whenever the dock is hidden, invoking the Spaces Renamer status-bar menu causes a weird effect that I can only describe as "flickering". This isn't just an odd visual artifact of the UI but it functionally affects UX as well since I'm unable to modify anything in the input fields.

To be clear, the text box does get highlighted momentarily and the contents of that Space are selected (or if it's a new/unnamed Space, I can confirm from zooming in that the cursor is indeed placed there in the empty input field for text entry) ...for just a brief moment, and then focus is suddenly lost.

At the same time, if the desktop is visible + you have enough icons that it forms at least one complete vertical column, the icon of the bottom-most row gets translated over to the top-most row of the adjacent column... and then it shifts back to it's original position, over and over again.

This animation is indicative of when the dock gets hidden by macOS and the desktop adjusts the density of it's contents accordingly (assuming you use the "Stacks" feature to automatically collate content by attributes like date or kind etc –– if you don't use this OS-provided self-sorting snap-to-grid config for your desktop I can only assume that you enjoy the clutter ~cuz you're an agent of chaos that revels in complete anarchy and utter disorder~ 😅 ) but the weird thing is the dock itself doesn't actually pop up on the screen. Or if it does, it's so quick before it's cyclically disabled and re-enabled again that it isn't discernable to the naked eye and thus the "dance of the desktop icons" becomes indistinguishable from a visual glitch that seemingly persists only so long as the Spaces Renamer window is invoked (which still remains impervious to edits or inputs while in this "flickering" state)

So yeah, that's my best guess / the steps to reproduce this bug: if the dock is hidden prior to invoking the Spaces Renamer menu-bar app, input focus is abruptly lost since the "flickering desktop / dance of the icons" glitch occurs (my observation) because (this is my assumption) macOS is rapidly un/hiding the dock on a loop for some strange reason (even if the dock-reveal animation-speed can't keep up and it isn't apparent, I'm fairly certain this is what's happening behind-the-scenes and causing the "desktop flicker" bug that forcibly arrests focus from Spaces Renamer's input window).

Versions

  1. MySIMBL version - MacForge 1.2.2 (3)
  2. Spaces Renamer version - 1.10.4 (bundle) and 1.10.1 (.app)
  3. MacOS version - Sonoma 14.5

Command Outputs
Please paste the output of running these commands in Terminal:

root              5892   0.0  0.0 410640592   1504   ??  Ss    4:02AM   0:00.04 /Library/PrivilegedHelperTools/com.macenhance.MacForge.Injector
joelthomas        5891   0.0  0.2 411525216  17840   ??  S     4:02AM   0:00.19 /Applications/MacForge.app/Contents/Library/LoginItems/MacForgeHelper.app/Contents/MacOS/MacForgeHelper
joelthomas        5878   0.0  0.3 412281728  28224   ??  S     4:02AM   0:01.38 /Applications/MacForge.app/Contents/MacOS/MacForge
joelthomas        1198   0.0  0.0 35716688    892   ??  S     2:16AM   0:47.80 /Applications/SpacesRenamer.app/Contents/MacOS/SpacesRenamer
jvthomas90 commented 1 month ago

FYI I can easily work around this by temporarily revealing the dock (default keyboard shortcut is ⌥⌘D – or I guess you can use the mouse too ~like a muggle~ to take your time and hover over the dock separators to click the context menu item, or dig around in System Settings and switch off autohide there, etc etc) and only then interact with the Spaces Renamer window before toggling the dock off again

...but this obviously isn't a solution to the underlying problem. I'm just letting you know that this doesn't cripple the UX, it just hampers it a little, until a more seamless fix is patched in anyway.

Also, I figured this workaround might be useful info for any others that may have run into this problem before and find their way to reading this issue :)

dado3212 commented 3 weeks ago

Have a repro for this, and this actually lines up with some other issues I've had around intermittently losing focus, and delays while swiping between spaces. I know the problem, but need some time to come up with the right solution, but am working on this!

dado3212 commented 2 weeks ago

https://github.com/dado3212/spaces-renamer/releases/tag/v1.11.0

Can you try the SpacesRenamer file in this build and confirm if that resolves the issue?

jvthomas90 commented 2 weeks ago

Seems to fix the flickering issue at first glance, but I've only had it running for a few minutes. Will update if I run into any other issues later on, but for now it looks like a solid patch that takes care of the problem. 🫡 Thanks!