IT lexicon › Programming › MotionNotify

MotionNotify

Programming På svenska → Updated: 2026-10-10

The X11 event for pointer movement, complete with a built-in way of not receiving it — because a mouse can produce more events than a 1980s network was willing to carry.

A window that selects PointerMotionMask gets a MotionNotify with coordinates and modifier state every time the pointer moves inside it. With ButtonMotionMask, or Button1MotionMask through Button5MotionMask, events only arrive while a button is held — which is what a paint program, or a window manager dragging outlines, actually wants.

For clients on the far side of a network there was PointerMotionHintMask. The server then sends a single event flagged is_hint and nothing more until the client asks where the pointer is with QueryPointer. The client gets the latest position rather than the whole path. Those who wanted the path could request the server's motion history with GetMotionEvents, but the buffer was optional and frequently empty. XInput 2 later took over anything needing precision.

← Back to the lexicon