Spotlight › Desktop
Desktop wallpaper
The desktop can now be covered with a small picture repeated edge to edge, in colour or in black and white. Moving a window redraws only the strip of desktop it uncovers, just as the plain background did.
- Built-in designs
- 6
- Added to the kernel
- 55 bytes
- Window drag on the XT
- 6–8% slower
01 / What it is
What it is
Windows 3.1 called it wallpaper and OS/2 a background bitmap: a small picture repeated in rows and columns behind every window, so the desktop is a pattern instead of a flat colour. os8088’s desktop had a grey dither, or a solid colour in the Color theme. It can now be one of six pictures, Bricks, Weave, Circuit, Floppies, Waves and Stone, or a picture of your own.
Each design is a 64 by 64 pixel tile in the 16 colours of an EGA or VGA card, plus a black-and-white version for CGA and Hercules screens, drawn for those screens rather than worked out from the colour one. Both come in one file of 2.3KB. The wallpaper changes only the desktop’s background: windows, menus and icons keep the look of the theme you chose.
Browse... on the Wallpaper page opens a PNG or JPEG picture and turns it into a tile, fitted to 64 pixels wide and reduced to the 16 colours, with its own black-and-white version. The picture becomes the wallpaper at once.
02 / On the screen
On the screen
03 / How it works
How it works
os8088 never repaints the whole screen when a window moves. It works out the exact rectangles of desktop that the move uncovered and draws only those. The wallpaper is drawn by the same single routine that drew the plain background, given the same rectangles. So it covers the same pixels, in the same number of drawing calls; only the cost of each pixel changes.
Each pixel’s place in the tile comes from its position on the whole desktop, not on the screen. A strip drawn after a window moves lines up with the picture around it, and on two screens the pattern carries on across the join.
The drawing code is not part of the resident system. It is a file on the system disk, read in when a wallpaper is chosen and kept while one is shown. Choosing None frees it. For VGA it was rewritten once, after the first version made the background 17 times slower to draw than the dither: it now prepares each row of the tile once and repeats it, four colour planes at a time.
The colours are chosen once, on the build machine, for the six designs, and once by the importer for your own picture. Nothing about the picture is worked out again while the desktop is drawn.
04 / What it costs
What it costs
Measured on MartyPC’s emulated IBM PC and XT at 4.77 MHz.
| What | Plain background | Wallpaper |
|---|---|---|
| Drawing one 64 by 64 square of desktop, VGA | 3.7 ms | 11.6 ms |
| The same, CGA | 6.3 ms | 17.3 ms |
| The same, Hercules | 6.0 ms | 17.2 ms |
| Dragging a window over the desktop, CGA | 496 ms | 526 ms |
| Dragging a window over the desktop, Hercules | 518 ms | 561 ms |
The kernel grew by 55 bytes. The drawing code takes about 8KB while a wallpaper is shown, and nothing otherwise. Turning an 80KB, 640 by 480 JPEG into a wallpaper takes 33 seconds on the XT.
05 / What it does not do
What it does not do
One small tile, repeated. A picture is not stretched or centred over the whole screen; it is fitted to a tile 64 pixels wide and repeated.
A flash when a full-screen program ends. Under a wallpaper, a drive icon that a window half covered is drawn a moment after the picture behind it, which shows as a short flicker on the 4.77 MHz machine.
Not on every disk. The 360KB system disk carries Bricks and Weave; the other four designs and the picture importer are on the 360KB utility disk. The 128KB system has no wallpaper.
06 / Choose one
Choose a wallpaper
Boot any os8088 system disk except the 128KB one, with the system disk in drive A.
Click the menu at the left end of the menu bar, choose Control Panel and open the Wallpaper page.
Click a design and press Apply, or pick it from the list on the compact panel. To use a picture of your own, press Browse... and open a PNG or JPEG file.
Close the panel to keep the choice for the next start. Choose None to go back to the plain desktop.