cherrypick: Disable swap interval in GLX wxGLCanvas implementation too#5
Open
dmitrii-galantsev wants to merge 1 commit intoSoftFever:masterfrom
Open
cherrypick: Disable swap interval in GLX wxGLCanvas implementation too#5dmitrii-galantsev wants to merge 1 commit intoSoftFever:masterfrom
dmitrii-galantsev wants to merge 1 commit intoSoftFever:masterfrom
Conversation
We need to do it when using XWayland for the same reasons as we had to do it in the EGL version when using either XWayland or Wayland directly: without this, we can block for up to 1 second in glXSwapBuffers() if the window is hidden, see wxWidgets#23512. Closes wxWidgets#24163. Closes wxWidgets#24165.
Author
|
@SoftFever @Noisyfox |
There was a problem hiding this comment.
Pull request overview
This PR cherry-picks a fix from the upstream wxWidgets project to disable swap interval in the GLX wxGLCanvas implementation. This addresses an issue where glXSwapBuffers() can block for up to 1 second when the window is hidden under XWayland, similar to issues previously resolved in the EGL implementation.
Changes:
- Added
wxGLSetSwapIntervalhelper function to disable blocking inglXSwapBuffers - Modified
SwapBuffers()to call the new helper on first invocation - Added member variable
m_swapIntervalSetto track whether swap interval has been configured
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| include/wx/unix/glx11.h | Added m_swapIntervalSet boolean member to track swap interval configuration state |
| src/unix/glx11.cpp | Added TRACE_GLX constant, wxGLSetSwapInterval helper function, and modified SwapBuffers() to disable swap interval on first call |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Cherry-pick of wxWidgets@3dde6bd
Should resolve OrcaSlicer/OrcaSlicer#11849 and replace OrcaSlicer/OrcaSlicer#12119
Original:
We need to do it when using XWayland for the same reasons as we had to do it in the EGL version when using either XWayland or Wayland directly: without this, we can block for up to 1 second in glXSwapBuffers() if the window is hidden, see wxWidgets#23512.
Closes wxWidgets#24163.
Closes wxWidgets#24165.