-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Weird behaviour with mouse detection #368
Comments
About the issue where the popup flickering when it's over the bar (with Changing the line to
or
fixes the issue, but now global.exit fires late for some reason, when i leave the popup with my mouse to outside, it only goes away after a second or so. Also, found another workaround for now, setting |
I think the popup flickering problem is fixed on current master. The other problem is connected to the way window events are handled internally on macOS, as you have already pointed out: The windows with a "regular" decoration have a slightly larger "hitbox" than their visual appearance (and their snapping bounds). One way to achieve this would be to add a new key to the |
so fast, just tried and it works, thanks a lot! ❤️
That's very good to hear, and it'll also fix notifications going behind the bar too |
I have added the new option to the bar domain, now you can have |
Very cool, I've been looking to have this for some time. Thanks a lot! |
Problem
Item receives 'mouse.exited' before the mouse actually leaves the bar completely. This happens in the last 4 pixels of the bar.
Causing the popup to close before my mouse gets to it.
Item is subscribed to events
mouse.entered mouse.exited mouse.exited.global
and setspopup.drawing
on
for$SENDER = *entered
andoff
otherwise.I have the bar with
height=64
andy_offset=0
. Any more and it spills under my notch, and less gets under, so it's the exact height.topmost
is off, which is a part of the problem.Also yabai is turned off to make sure it's not messing with anything. Don't need it's
external_bar
option as i have a notch on my screen and it pushes windows away already.Demonstration
vid1.mp4
With the item
background.y_offset=4 background.color=0xffff0000
to show the exact location of the problem, and to prove that mouse is in fact still located in the bar:Demonstration
vid2.mp4
This happens with windows that have the usual macos style borders, so
kitty
withhide_window_decorations yes
don't have this for example.My shitty workaround was setting
external_bar
ofyabai
to something bigger to have a gap between sketchybar and windows, then painting the top of my wallpaper to match the bar color so the gap is not noticable.Setting
y_offset
for popups so they sit higher don't work either. When mouse goes over from item to popup, it receivesmouse.exited
andmouse.entered
briefly, causing this glitch:Glitch
vid3.mp4
Possible workarounds
topmost=on
. This comes with the annoying problem of not being able to reach the original menu bar to use the app menu items. If we could have a way to draw over everything except menu bar it would be golden. Or just have an event that we can subscribe to so we hide the bar on menu bar show (best option imho).2) Don't reportmouse.exited
when the mouse exited to enter same item's popup and prevent the loop of receivingexited
andentered
continiously3) Maybe have$INFO
formouse.exited
to report the newly entered item, or justbar
if mouse was exited to empty space. So we can decide not to close the popup.edit: I was assuming a behaviour that doesn't exist, so these makes no sense now..
For option 1 i think we need to have it anyways regardless of this specific issue. I don't understand the purpose of it when you have the bar at the top and your menu bar on auto-hide. So if it's easy enough to implement it could be nice to have it.
Option 2 also seems like a bug to be fixed, since in sketchybar popup and it's item considered to be the same items (in context of events), so it seems like it shouldn't firemouse.exited
.Let me know if these are not in your scope at the moment, and i can try to have a go at fixing it. Coming from high level languages (or just being incompetent lol) source of this repo is very alien to me every time i try to inspect some stuff, but it could be a good chance to learn.
Edit:
Minimal config
The text was updated successfully, but these errors were encountered: