-
Notifications
You must be signed in to change notification settings - Fork 40
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
Wrong cursor on Context menu #3331
Comments
Something has been screwing with my cursor, forcing it to the Edit: It certainly seems to be ST. I quit ST and it stopped happening. I can't reliably get it to start happening, but when it does, my cursor in every program (even the desktop) is the last cursor that ST assigned. Same Build/OS as above. |
Echoing that this happens outside of just the context menu. |
I'm not sure if initial report is the same issue but I definitively have the same issue as @michaelblyons and probably @TheSecEng . In fact, I just diagnosed it a bit more and found out that it's probably related to Terminus. Filed issue there: randy3k/Terminus#219 |
I can trigger this consistently when switching between macOS desktop spaces: Build: 4074 |
@rchl I do not have Terminus installed, so it's not specifically that. It could conceivably be some other thing that Terminus and some package I do use have in common. @pvanb Doing something like your screencast is how I realized it was ST. But sometimes when I first restart ST, it doesn't happen right away. |
There are two issues being discussed here:
Situation 2 should not be possible, based on my understanding. Cocoa apps get to tell the OS what cursor to use when the cursor is over an application window. The can't manage the global system cursor. That is managed by the OS in concert with the active application. |
It might be interesting to know what sort of display configuration you are all running. I am using macOS 10.15.5 with a rMBP 15" and an external 32" 4k display running at around 1.5 scale. I regularly have cursor issues on my external, using all different apps. I just got it stuck two different times in Safari. |
MacBook Pro (Retina, 15-inch, Mid 2015) Has happened each with
It's kind of amusing to mouse around in this very textarea (Firefox Beta) and see the cursor go from a black-with-white-border |
@michaelblyons Can you reproduce if you reboot your machine and don't connect an external at all? So far everyone seems to be using mixed scales with external displays… |
@michaelblyons I just restarted Sublime Text and you're right, it doesn't happen right away. |
@wbond I'll try to reboot out of business hours, but restarting ST itself immediately cleared the problem for the moment. So far, it's been 40 minutes with no trouble. All of us would love to know what specifically triggers the weird behavior, but my suspicion is that it will be hard to track down. Also, I'm eventually going to have to plug in a monitor. Edit: 30 minutes after this was posted, I've started getting the weird cursor flickers in Sublime Merge. Firefox only maintains control of the cursor shape after it crosses a transition area (e.g. from |
Anyone who has the issue could confirm whether it's the same one I'm having by killing zsh/bash process that is a child of plugin_host process. If the problem goes away then it should be the same as randy3k/Terminus#219 And if it's not that, one can still keep killing subprocesses of plugin_host to see which process is triggering the problem. |
I’ve not got terminus installed. But I will try selectively killing the processes within plugin host |
I don't have either terminus. But yeah I've got the same behaviour that @michaelblyons has. |
I killed the 2 Python processes under I don't know a lot about |
i join the party. a similar thing happens to me constantly with ST4, and on ST3 ONLY in fullscreen mode, with other floating apps on top of ST, on 3 devices. no external displays. you can see below the issue with ST4. ST3 works fine. ST3: https://share.getcloudapp.com/kpu5Dz2m
|
The primary difference for you @godbout would be that ST4 uses OpenGL by default on Mac. Try setting |
If anyone else wants to try with OpenGL turned off, it may help in further refining what causes the issue. |
Will do. |
@wbond same issue, sorry. and i confirm that OpenGL is not launched (when setting to none, no OpenGL info before the first pain in the console). |
Hmm, off of the top of my head I can't think why ST4 would cause the issue and ST3 wouldn't, then. What is the app that is doing the overlay? Is it possible it has a work-around in place for ST3? |
not sure if that helps but just in case i'll say again: ST3 also gives the same issue in fullscreen only. maybe that gives some idea? |
@wbond i thought about that. the app is Dash, and i thought at the first the issue was coming from it. but i've also noticed the issue with Alfred, then HazeOver, etc... hence i posted here. i could see with Dash ultimately because it's where it's the most annoying, but definitely something weird is coming from ST. thanks for the help! |
Only that it is probably some arcane macOS bug. The core issue here is that we can't control the pointer, except for our window. That is how the macOS NSCursor API works. If Sublime Text is affecting the cursor for another app, or when a menu is showing, as far as I can tell, that is due to some sort of issue with macOS. If you think about it, it would not be good for an app to mess with the cursor within another app. Granted, I don't know how the macOS screenshot cursor is controlled - but it seems to be implemented at the window manager level since hitting space will draw a blue overlay over the window that will be captured. Right now I'm just trying to figure out if we can pin down any special circumstances that mitigate the issue. My hunch is that the bug is triggered in macOS by the fact that we have a custom cursor for the I-Beam. I believe the screenshots and videos I've seen so far all show the I-Beam. I don't have any of those apps installed, but I will try at some point to reproduce in an effort to see if disabling the custom I-Beam helps. |
In case it is relevant, one of my ST4 windows is full-screened, pretty much continuously. |
@wbond no worries. although it does seem to happen only with ST. maybe you guys could ping Apple? with the exposure you have they'd probably listen. reminds me of another issue i have with ST. sometimes i open it, it's the focused app, but i can't type. if i type i just does a |
3 days with OpenGL off, and no recurrence yet. |
nice, thanks. will try then too. found out after posting here that it's wasn't just Dash (or Alfred, HazeOver, etc...). the whole system is affected, even Finder 😭️ |
OpenGL off, same issue with my three machines (rebooted). iMac 27 works the same, MacBook 12 works the same (2016), but MacBook Pro (2020, 32gb ram, highest CPU) is sluggish. definitely OpenGL off. no OpenGL message in the console at startup, and the 3 ST share the same settings file. |
also quit all apps btw, in menu bar and all. didn't help. |
@michaelblyons OpenGL off actually seems to solve the issue if ST is not in fullscreen mode. so basically it makes it behave like ST3. still (for both) not working if in fullscreen mode. |
I still have my permanently-fullscreened window open, but I haven't used an external monitor since I turned off OGL. [Still no recurrence] |
I have been seeing the issue with the text select cursor showing in other applications. OpenGL is on, MacBook Pro 16" with 1920x1080 external monitor where ST is usually displayed. |
Maybe related maybe not but opening the Open dialog on Mac (cmd+o) is also problematic in regards to the cursor. It seems like the cursor is stuck to the shape that was used before dialog has been opened. If it was "I-beam" cursor then it will stay as one even when hovering different elements in the dialog. I can't see such behavior in other apps. This seems to happen regardless of hardware acceleration. |
I think we've established that macOS has a bug here - I need to look into what version of macOS they changed the IBeam to work reasonably on dark backgrounds. The reason we run a custom one is because at least in some versions it was very hard to see: https://apple.stackexchange.com/questions/107737/i-beam-cursor-color-in-maverickss-terminal. |
Hence:
|
Based on checking a 10.12 and 10.14 VM I have, it seems 10.14 fixes the contrast issue with the default I-Beam. This seems to be reinforced by this comment: macvim-dev/macvim#910 (comment). I did not test 10.13 since I don't happen to have a VM of that. Next I'll see if I can reproduce the issue before and after changing with cursor we use to see if it helps. |
Came back with OpenGL off. 😞 |
it does really affect the whole system. Chrome, Safari, iTerm. anything. so it's a system wide cursor robbery :o |
not sure if i'm only noticing now, but it seems it's only an issue in fullscreen, and when ST has the focus. i was trying to make a GIF showing that it works fine when i focus on chrome but my tools doesn't handle recording two apps in fullscreen (time to change app), so i exited the fullscreen. the issue is gone.
hope this helps a bit. |
I just un-fullscreened the window I have that is (almost) permanently fullscreened, but I'm still getting the weird stuff here in Firefox. New hardware, though: 2020 MBP 13", MacOS 10.15.6 |
ahhh. yeah you're right. it's more complicated. in fullscreen in my case, ST always steals the cursor right away. but if not in fullscreen, it steals it after about a second if i don't move it. |
I almost never use fullscreen and constantly have this issue. |
My god, I thought I was going crazy and founded this issue. Not only in context menus but in for example hover links in the browser have a text cursor Basically I always have 2 windows (projects) open in Sublime. Never used fullscreen. This always happens when I leave Sublime (ST4) open for a long time. Restarting fix the issue. I thought at the beginning that it could be some problem related to theme customization that I did. |
Alright, I found a number of little things that contributed to this. Everything should hopefully be working properly in the next build. |
🤩️ |
FIXED! thank you! the update of August 19 solves this issue (although breaks some other stuff 😬️). but that one is solved! 😗️😗️😗️ |
The three following issues were fixed in build 4083:
|
Description
Context menu keeps the cursor of what it comes from (like text selection for instance)
Steps to reproduce
Expected behavior
Having the default cursor
Actual behavior
Having the previous cursor where it comes from
https://imgur.com/a/Ssqmuas
Environment
The text was updated successfully, but these errors were encountered: