IT lexicon › Programming › Expose event

Expose event

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

The X server telling a program that part of its window has just become visible and needs painting — now.

X11 never promised to remember what a window contained. When something covering it moves away, the server sends one Expose per uncovered rectangle, carrying position, size and a count field saying how many more are on the way. A common idiom in Xlib code was to ignore everything with count > 0 and redraw the whole window on the last one — simpler than clipping, and rarely noticeably slower.

Its cousin GraphicsExpose turned up when an XCopyArea tried to copy from an obscured region that didn't exist. A program that ignored Expose worked perfectly until the first time someone dragged another window across it. Backing store and save-unders could cut down the traffic, but every serious program still needed a proper repaint path in its event loop.

← Back to the lexicon