Fix window event pumping, mouse cursor sync and window sizing - #17
Merged
tomluchowski merged 1 commit intoAug 5, 2026
Merged
Conversation
Five related defects surfaced while getting the game running against OGRE 13.6.5 on X11. Pump window events. Ogre::Root::startRendering() no longer pumps them (Ogre::Bites does that for applications built on its context, which we are not), so ConfigureNotify never arrived: windowResized() ran only once at startup and CEGUI's display size and OIS' clipping rectangle went stale as soon as the window was resized. Drive the render loop directly and call messagePump() every frame. Exit cleanly when the window is closed. windowClosed() destroys the mode manager, but frameStarted() dereferences it before testing the exit flag, so the next frame segfaulted in _fireFrameStarted(). This was unreachable before, as close events were never delivered. Request exit from windowClosed() and check it before rendering. Hide the system cursor while grabbing. When grabbing, OIS tracks the pointer by accumulating relative motion and warps the real pointer back to the window centre near the edges; leaving that cursor visible showed it drifting away from the one CEGUI draws. Keep the configured video mode. initVideoConfig() dropped any video option whose value was not among the render system's possible values, but the video mode also sizes the window when running windowed, where it need not be one of the fullscreen modes. It was silently falling back to the minimum size. Raise the minimum window height to 660. MenuMain.layout stacks its seven buttons around the vertical centre with fixed offsets and needs 660px; below that the game clipped the "Quit" button off its own menu. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (cherry picked from commit eac4b7d)
tomluchowski
reviewed
Aug 4, 2026
| paramList.insert(std::make_pair(std::string("x11_mouse_hide"), std::string("false"))); | ||
| // When grabbing, OIS tracks the pointer by accumulating relative motion and warps | ||
| // the real pointer back to the window centre near the edges. Leaving the system | ||
| // cursor visible then shows it drifting away from the one CEGUI draws, so hide it. |
Owner
There was a problem hiding this comment.
It took me a while to understand what it is trying to say.
Anyway shoudn't the system cursor be always hidden ?
Author
There was a problem hiding this comment.
In Ubuntu 24.04 there was a serious mouse sync issue.
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.
Five related defects that surfaced while getting the game running against OGRE 13.6.5 on X11:
Ogre::Root::startRendering()no longer pumps window events for applications not built on Ogre::Bites, so resize events never arrived and CEGUI's display size and OIS' clipping rectangle went stale. The render loop is now driven directly withmessagePump()every frame, and the mouse cursor, window sizing and related event handling are fixed along the way.One commit:
Fix window event pumping, mouse cursor sync and window sizing.Split out of #16 so each topic can be reviewed on its own. Merging all of the split PRs reproduces the tree of #16 exactly.
🤖 Generated with Claude Code