How Windows 3.11 Managed Screen Redraws
In Microsoft Windows 3.11, moving a window across the desktop relied on wireframe bounding boxes, dirty region tracking, and cooperative message handling rather than live, full-window rendering. Because early 1990s hardware lacked dedicated 2D acceleration, massive video memory, and desktop compositing engines, the operating system minimized graphical overhead by drawing temporary inverted outlines during a drag and relying on the Graphics Device Interface (GDI) to issue paint requests only after the window was dropped.
During an active window move, Windows 3.11 avoided redrawing live
window contents altogether. Instead, it used an outline dragging
technique commonly called a "wireframe." As the user dragged the title
bar, the operating system drew a simple, single-pixel-wide border
tracking the cursor using an exclusive-OR (XOR) raster operation
(PATINVERT). Drawing with XOR meant that drawing the exact
same rectangle a second time automatically restored the original pixels
underneath. This eliminated the need to cache desktop pixels in memory
or trigger expensive redraw cycles while the mouse was in motion.
Once the user released the mouse button to place the window, the true screen redraw process began through region invalidation. The GDI calculated two distinct geometric changes: the newly occupied area and the newly exposed background area where the window used to sit. The newly exposed desktop area was immediately flagged as "invalid" or "dirty." GDI set a clipping region restricted specifically to these exposed coordinates, ensuring that any subsequent rendering would only alter the pixels within the dirty boundary, leaving the rest of the screen untouched.
To refresh the exposed area, Windows 3.11 relied on its cooperative
message queue. The system posted a WM_ERASEBKGND message
followed by a WM_PAINT message to the message queue of each
application owning an exposed region. Affected applications retrieved
this message, called the GDI function BeginPaint() to lock
the clipping region, redrew their contents directly into the video
display buffer, and called EndPaint() to mark the region as
valid again.
Because Windows 3.11 lacked desktop compositing and modern
double-buffering, applications drew straight to the single video card
framebuffer. Furthermore, since the 16-bit environment used cooperative
multitasking rather than preemptive scheduling, the entire screen update
process depended on applications actively checking their message queues.
If a background program was hanging or busy computing a task, it failed
to process its WM_PAINT message, resulting in visible white
voids or ghosted trails of the moved window until the application
regained execution time.