Gridded toplevel windows in Windows XP doesn’t seem to restrict the user from resizing in multiples of a number. It works in X, but not in Windows. I can resize to any pixel size.
Doesn’t the Windows windows manager support it? Can i do it manually, maybe by binding some commands to the resize event of the toplevel?
You’re correct that it doesn’t really work on Windows (this is also true for Mac OS X/Aqua) and it is because the window manager itself doesn’t support the feature. You have to synthesize it with some scripts. However the real complication is that a typical gridded window is more than just the one gridded window; there’s some extra space around it which can make the updated size go into the next grid size up and that makes the window expand a bit and resize again… and again and again…
Thus, we need a two-stage initialization, first measuring the real size of the extra space we have to allow for and only then applying the enforcement code.
As you can see, this isn’t particularly simple to get right!