The Land of Wind, Ghosts and Minimised Windows

Originally published 2006 in Atomic: Maximum Power Computing
Last modified 03-Dec-2011.

 

There's a saying attributed to Otto von Bismarck: "People who enjoy eating sausage and obeying the law should not watch either being made".

The same goes for computer operating systems.

I'm indebted to famous Microsoftie (and compulsive liar) Raymond Chen for some insights (shamelessly stolen from his blog, to which you will find many links on this page) into the ingredients of that very special sausage called Windows.

I can't say my heart is overflowing with sympathy for the manifold difficulties that beset poor Microsoft, but learning about this stuff has made me mellower about Dumb Stuff Windows Does. Many apparently stupid features of Windows really have been forced upon Microsoft by their decision to give third-party developers free rein to make whatever programs they like, whether they stick to Microsoft's guidelines or not. That decision played a big part in giving Windows its huge software library, but it also caused problems.

Users, quite reasonably, expect to be able to install a new version of Windows without breaking their old applications. When developers do stupid, stupid things, Microsoft is then left with no alternative but to stick kludges and patches and shims into their operating system, to minimise the ability of crappy programs to screw stuff up.

Small quirks from back in the mists of Windows history can, therefore, still be seen in very obvious ways even today. Like, for instance, how everything on the Windows desktop is redrawn every now and then. And will probably continue to be for some time yet.

Some of this stuff is still entirely down to Microsoft, of course; keyboard navigation is a fine example of the kind of secret-handshake stuff that starts cropping up when developers paint themselves into a corner.

Some other results of backward-compatibility patching, though, are very strange indeed.

Here, for instance, is a Zen question for you:

Where is an icon?

How, in other words, does your computer know where on the on-screen desktop to draw a given icon?

And I've got another one:

Where do windows go when you minimise them?

Both of these questions seem to have simple enough answers.

Icon positioning, for instance, is just X and Y coordinates, innit?

OK, relative positions change when you change screen resolution, but that's no big deal. The interface can pile stuff up on the screen edges if the resolution drops, and create new empty space if it rises. Sorted.

And window minimisation seems simple, too. Stop drawing the window, draw instead (on Windows systems) a taskbar button, done.

Except that isn't how it works.

Windows PCs, you see, have screen coordinates, which are indeed your basic graph-paper X and Y, though they start from the top left, rather than the bottom left of common graph paper.

But Windows also has workspace coordinates. The workspace, basically, is the screen minus the taskbar. It's the area available for programs to put their stuff on, if they don't want to end up running into the taskbar.

You can see this difference if you put the Windows taskbar at the top of the screen, Mac-style. Now, some subtly buggy programs will move their window one taskbar-height higher every time you minimise and restore them. This happens because those programs save their pre-minimisation position using workspace coordinates (where 0,0 is the first "usable" pixel, the one at the left of the screen on the first line below your new top-mounted Taskbar) and then restore it using screen coordinates (where 0,0 is the actual top left corner of the screen).

Eventually, the window for a program with this bug will creep right up under the Taskbar. And if the program's happy with negative location coordinates, its window will keep on going - off the screen entirely.

The same problem can arise with a Taskbar on the left edge of the screen, but not with right- or bottom-edge Taskbars, because coordinates start from the top left. If the Taskbar isn't at the top or the left, the screen coordinates and workspace coordinates are the same, and the bug remains invisible.

Windows icon positions work in this way, too. So icon locations can, in theory, be screwed up in the same way.

But wait, there's more.

Imagine that you have two monitors, as indeed many people do these days. Your big main monitor is running at 1600 by 1200, and your smaller secondary monitor is running at 1024 by 768.

If you innocently position the second monitor to the left of the first, you'll now have a workspace which is 2624 pixels wide, and 768 pixels high... on the smaller left monitor. On the main monitor, it'll be 1200-minus-the-taskbar pixels high.

Programs which naively assume that the workspace must be a rectangle can, now, give icons or whole windows locations that lie in the black zone off the edge of the lower-resolution screen. Right-clicking on the taskbar button and selecting "Move" for such a window will help you not at all.

Workspace coordinates in the black zone are perfectly legal, but neither of your monitors can see that area - well, not unless you go into Display Properties -> Settings and move the secondary monitor around.

If you're in this predicament, by the way, I suggest you try the freeware utility Force Window Visible, which does what its name suggests. If you attempt to make black-zone areas visible by fiddling around with the location of your secondary screen, I've found you can end up with Windows doing neat things like not allowing any icons to be more than 1600 pixels from the left edge of the second screen, until you reboot.

(Since I put this page up, a couple of readers have pointed out that the "Move" option actually does work for off-screen windows - you just have to select Move and then press an arrow key, not click the mouse. The arrow key will attach your mouse cursor to the middle of the window's title bar, and now you can use the arrow keys or the mouse to move the window around! You'll still need Force Window Visible if the Move option isn't available, though - perhaps because the window in question doesn't have a taskbar button.)

(Oh, and Force Window Visible is pretty cool, but it's still not as good as the Amiga keyboard shortcut that let you override the minimum size that windows were meant to be allowed to have. If you wanted, you could then turn a window completely "inside out", moving its bottom-right corner above and to the left of its top-left corner. Letting go of the mouse button then would take you directly to visit the Guru.)

The workspace coordinate system also means that if you start Windows with your secondary, left-hand monitor turned off, your icons will all be squished up on the right-hand side of your main screen.

Why? Because without the left-hand monitor, the workspace started at the left edge of your primary monitor. Windows then started counting its icon X coordinates from there, even though it had saved the icon positions with X coordinates that counted from the left edge of the second monitor.

Tah-daah!

Window minimisation is the real champion, though. It's just great how Windows does that.

Windows can't, you see, just blithely stop drawing a program's window when that window is minimised. I think that's because you can't count on programs to redraw themselves correctly, or because they may freak out if one or more of their various window-drawing strategies is not correctly bit-bucketed.

Look, just trust me - there's a (fairly) good reason.

And yet, people want to be able to minimise windows. And not just by turning them into goofy desktop icons like Windows 3 did.

So what modern Windows versions actually do when you minimise a window is move the window. They put a new box on the taskbar too, but the window itself still exists... elsewhere.

WinNT and its descendants - possibly even Vista and Windows 7, though I'm not sure - move minimised windows to the undisplayable location -32000, -32000.

Way up there, eight to ten metres above and to the left of your monitor(s), all of your "minimised" windows are hanging in the air.

Windows 95 and its descendants, though, couldn't go that far. They should have been able to, but too many programs - serious expensive commercial programs from companies that should have known better and written their software to Microsoft's specifications - went crazy when presented with large and/or negative window locations. Windows 95 had to work with as much existing software as possible, so it ended up moving "minimised" windows to only +3000, +3000. (Read all about it on Raymond's blog here.)

The +3000, +3000 position stayed the same for the rest of the 95-derived Windows variants - Windows 95, 98, 98SE and ME. And it gives rise to an amusing artefact.

If you install one of those versions of Windows on a computer with two really humungous monitors (or three normal screens), and then tell Windows that the screens are positioned diagonally with the primary at the top left, you can see the Land of the Minimised Windows. Down there on the bottom-right monitor, they'll all start piling up.

Perhaps, one day, we'll all have hard drives big enough that we can also see the Home of the Overwritten Files.

Or enough RAM that we can load software that hasn't yet been written.

Or sound cards that can record one hand clapping.

Other columns

Learning to love depreciation

Overclockers: Get in early!

Stuff I Hate

Why Macs annoy me

USB: It's worth what you pay

"Great product! Doesn't work!"

The virus I want to see

Lies, damned lies and marketing

Unconventional wisdom

How not to e-mail me

Dan's Quick Guide to Memory Effect, You Idiots

Your computer is not alive

What's the point of robot pets?

Learning from spam

Why it doesn't matter whether censorware works

The price of power

The CPU Cooler Snap Judgement Guide

Avoiding electrocution

Video memory mysteries

New ways to be wrong

Clearing the VR hurdles

Not So Super

Do you have a license for that Athlon?

Cool bananas

Getting rid of the disks

LCDs, CRTs, and geese

Filling up the laptop

IMAX computing

Digital couch potatoes, arise!

Invisible miracles

Those darn wires

Wossit cost, then?

PFC decoded

Cheap high-res TV: Forget it.

V-Pr0n

Dan Squints At The Future, Again

The programmable matter revolution

Sounding better

Reality Plus™!

I want my Tidy-Bot!

Less go, more show

In search of stupidity

It's SnitchCam time!

Power struggle

Speakers versus headphones

Getting paid to play

Hurdles on the upgrade path

Hatin' on lithium ion

Wanted: Cheap giant bit barrel

The screen you'll be using tomorrow

Cool gadget. Ten bucks.

Open Sesame!

Absolutely accurate predictions

The truth about everything

Burr walnut computing

Nothing new behind the lens

Do it yourself. Almost.

The quest for physicality

Tool time

Pretty PCs - the quest continues

The USB drive time bomb

Closer to quietness

Stuff You Should Want

The modular car

Dumb smart houses

Enough already with the megapixels

Inching toward the NAS of our dreams

Older than dirt

The Synthetics are coming

Pr0nBack!

Game Over is nigh

The Embarrassingly Easy Case Mod

Dumb then, smart now

Fuel cells - are we there yet?

A PC full of magnets

Knowledge is weakness

One Laptop Per Me

The Land of Wind, Ghosts and Minimised Windows

Things that change, things that don't

Water power

Great interface disasters

Doughnut-shaped universes

Grease and hard drive change

Save me!

Impossible antenna, only $50!

I'm ready for my upgrade

The Great Apathetic Revolution

Protect the Wi-Fi wilderness!

Wi-Fi pirate radio

The benign botnet

Meet the new DRM, same as the old DRM

Your laptop is lying to you

Welcome to super-surveillance

Lemon-fresh power supplies

A>B>C>A!

Internet washing machines, and magic rip-off boxes

GPGPU and the Law of New Features

Are you going to believe me, or your lying eyes?

We're all prisoners of game theory

I think I'm turning cyborg-ese, I really think so

Half an ounce of electrons

Next stop, clay tablets

A bold new computer metaphor

Won't someone PLEASE think of the hard drives?!

Alternate history

From aerial torpedoes to RoboCars

How fast is a hard drive? How long is a piece of string?

"In tonight's episode of Fallout 4..."

How hot is too hot?

Nerd Skill Number One

What'll be free next?

Out: Hot rods. In: Robots.

500 gig per second, if we don't get a flat

No spaceship? No sale.

The shifting goalposts of AI

Steal This Education

Next stop: Hardware piracy

A hundred years of EULAs

The triumph of niceness

The daily grind

Speed kings

Alt-tCRASH

Game crazy

Five trillion bits flying in loose formation

Cannibalise the corpses!

One-note NPCs

Big Brother is watching you play

Have you wasted enough time today?

The newt hits! You die...

Stuck in the foothills

A modest censorship proposal

In Praise of the Fisheye

Filenames.WTF

The death of the manual

Of magic lanterns, and MMORPGs

When you have eliminated the impossible...

Welcome to dream-land

Welcome to my museum

Stomp, don't sprint!

Grinding myself down

Pathfinding to everywhere

A deadly mouse trap

If it looks random, it probably isn't

Identical voices and phantom swords

Boing!

Socialised entertainment

Warfare. Aliens. Car crashes. ENTERTAINMENT!

On the h4xx0ring of p4sswordZ

Seeing past the normal

Science versus SoftRAM

Righteous bits

Random... ish... numbers

I get letters

Money for nothing

Of course you'd download a car. Or a gun!

A comforting lie



Give Dan some money!
(and no-one gets hurt)