Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3331532
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:35:37+00:00 2026-05-17T23:35:37+00:00

I am trying to create a a mouse wrap within X11 for openGL games/content.

  • 0

I am trying to create a a mouse wrap within X11 for openGL games/content. The approach I was trying to take is to hide the cursor (which I can do just fine), lock the mouse position in the center of the window and then use the mouse delta positions to detect movement. I cannot find any way however to lock the mouse position other then to keep moving it back to the center every frame.

In windows this can be done with ClipCursor() and in OSX mouse wrap can be done using CGWarpMouseCursorPosition. Does anything similar exist within the XLib libraries?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:35:37+00:00Added an answer on May 17, 2026 at 11:35 pm

    libSDL does almost exactly that and the source code of this might be a good starting point for your own implementation. Alternatively if the goal is cross-platform fullscreen application then just using SDL directly might save you reinventing the wheel here.

    The file in question for X11 seems to be src/video/x11/SDL_x11mouse.c, in particular the implementation of X11_WarpWMCursor.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
Trying to create a macro which can be used for print debug messages when
I am trying to create an effect when you place the mouse cursor over
I'm trying to create a popup menu, where I can detect the mouse button
I'm trying to create an element which when the mouse is over its image
I'm trying to create code in AppleScript that will click my mouse randomly every
I'm trying to create an effect where if the user hovers the mouse over
I am trying to create a glossary system which will get a list of
I am basically trying to create a display object transformation manager which will allow
I was trying to create a mouse clicked event of a JmenuItem but it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.