Skip to content

Issue # 3198 - #3307

Open
xan8ter wants to merge 2 commits into
teeworlds:masterfrom
xan8ter:fix-linux-rdp-mouse-issue-3198
Open

xan8ter wants to merge 2 commits into
teeworlds:masterfrom
xan8ter:fix-linux-rdp-mouse-issue-3198

Conversation

@xan8ter

@xan8ter xan8ter commented Jan 22, 2026

Copy link
Copy Markdown

Disabling Relative and Set Global mouse state fix the problem when playing in remote desktop in linux. (Ubuntu 25.10)

Disabling Relative and Set Global mouse state fix the problem when playing in remote desktop in linux. (Ubuntu 25.10)
@Dune-jr

Dune-jr commented Jan 22, 2026

Copy link
Copy Markdown
Member

What's with the changes in server.cpp?

@Bamcane

Bamcane commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

You'd better rebase it on the latest master :3

@xan8ter

xan8ter commented Jan 22, 2026

Copy link
Copy Markdown
Author

What's with the changes in server.cpp?
It's a change from Robert. (Server fix to avoid CAP CPU and cRashes)
My fix here is Only for the mouse. (Input.cpp)

;)

//fix-linux-rdp-mouse-issue-3198

SDL_SetRelativeMouseMode(SDL_FALSE);
SDL_GetRelativeMouseState(&x,&y);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you tell me what the usage of these codes ?

I think the only useful one is

		SDL_SetRelativeMouseMode(SDL_FALSE);

Anyway, just be like what Robyt3 mentioned in #3198

It looks like this is fixed in SDL 2.26.4:

I think the best solution is to update our libraries

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I saw his comment. My libraries are up to date, but the problem still persists.
The SDL fix for that was for Windows only.
You're right—setting it to SDL_FALSE also fixes the issue.
GlobalState just reduces CPU usage.
Setting them to 0,0 seems to init the cursor correctly.
I'll let you decide ;)

@Dune-jr

Dune-jr commented Jan 22, 2026

Copy link
Copy Markdown
Member

You should not include changes unrelated to the issue you are attempting to fix.

Disabling Relative and Set Global mouse state fix the problem when playing in remote desktop in linux. (Ubuntu 25.10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants