Jump to content
  • Advertisement
Sign in to follow this  
SteveDeFacto

Are keyboard and mouse inputs tied to a window in linux?

This topic is 2534 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

Are keyboard and mouse inputs tied to a window in linux? I searched google for awhile but didn't find anything useful.


By default in X11 the server routes pointer events to the toplevel window containing the screen coordinates of the event.  That means things like touches or mouse input.  Keyboard input is a little different, since it has no coordinates.  The currently 'focused' window has an implicit keyboard grab, but both pointer and keyboard events can be affected by explicit grabs as well.

Because input events are not really tied to a window, X11 allows, for example, the ability to scroll a window that's not  focused  or have multi-touch gestures to zoom or swap the entire desktop.  Huzzah.

Share this post


Link to post
Share on other sites

Because input events are not really tied to a window, X11 allows, for example, the ability to scroll a window that's not focused

I LOVE that feature of Linux and get frustrated when I can't do that on Windows.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!