jordanbaird / Ice

Powerful menu bar manager for macOS
https://icemenubar.app
GNU General Public License v3.0
9.95k stars 193 forks source link

[Bug]: Menu Bar Flashes #58

Open Haadi-Khan opened 1 month ago

Haadi-Khan commented 1 month ago

Check existing issues

Description

Upon switching workspaces, the menu bar flashes as it appears to refresh. This is consistent w/ different methods to switch the workspace (i.e. swipe gestures/keybinds). It is present for both split and standard menu bars.

I am using Yabai, but the bug persists with it disabled.

Steps to Reproduce

Switch workspaces and there's a flash.

Ice Version

0.8.0

macOS Version

14.4.1

Screenshots

https://github.com/jordanbaird/Ice/assets/44217975/a48f3af0-af38-4035-ba36-03405c5412fc

jordanbaird commented 1 month ago

This is the expected behavior. macOS doesn't inform applications of workspace changes until after the change occurs. Ice moves the menu bar appearance overlay to the new space as soon as it receives the notification. We could theoretically maintain a separate overlay for each workspace, but that would waste lots of memory, as only one workspace can ever be visible per display.

rojnwa commented 3 days ago

This is the expected behavior. macOS doesn't inform applications of workspace changes until after the change occurs. Ice moves the menu bar appearance overlay to the new space as soon as it receives the notification. We could theoretically maintain a separate overlay for each workspace, but that would waste lots of memory, as only one workspace can ever be visible per display.

Would it be possible to implement the solution and make it an optional setting that is set to false by default? Personally, the flashing is more important to me than my memory and maybe some other people have the same opinion.

The text in brackets could be added as an information, visible as a tooltip when hovering over an info icon.

jordanbaird commented 3 days ago

@rojnwa I recently implemented a mockup of this, and it doesn't seem like it actually would take much more memory. Seems like offscreen windows are pretty efficiently cached. So this is doable, I just need to get to it. #136 was opened recently, so I've been tracking the fix there.

rojnwa commented 3 days ago

@jordanbaird Great news! Looking forward to this but wouldn't it make more sense to flag #136 as duplicate and continue this one as it's older and essentially describes the same bug?

jordanbaird commented 3 days ago

@rojnwa Yeah, you're probably right.