Workaround for crashing when many tooltips are shown consecutively #563
+25
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #559. After researching it, the culprit seems to be the Nvidia driver, which causes a problem with GTK.Popup, which is used as tooltips when hovering launchers in the doc since #441.
Adding a big enough delay before showing the tooltip seems to prevent the error (or at least making it very unlikely). I tried 1ms and it seemed to reduces the crashes quite a bit already, but I succeeded with 50ms by increasing the pointer speed, so I set it to 100ms.
This can also have a positive side effect: When rapidly hovering the launchers, every tooltip were briefly shown, but not long enough to be readable. So the delay makes it less distracting a restores the behaviour before #441.
I only added the delay to the
Launcherclass, and not the parentBaseItem. Feel free to rework the PR or close it to implement a cleaner fix. Maybe a proper fix should be added to GTK, but a simple workaround by adding a delay like here would not be acceptable I guess.