Hey! This is the old a broken mold. Newer stuff is at abrokenmold.net.
That being said, feel free to rummage through the archives over here. Also feel free to leave comments; we're still keeping an eye on this.

With a lot of Unix and Linux window managers, you can drag a window around by holding the Alt key and using your mouse anywhere on the window. (The GNOME window manager can use some different keys, probably other WMs, too). This is incredibly useful. It allows you to get the window around quickly, and is so much faster than seeking out the title bar and dragging with that.

Anyway, enough with the persuasion; if you're going to like it, you'll be convinced when you try it. To the point, I found three programs to do the job for Windows: the Easy Window Dragging -- KDE style AutoHotkey script, AltDrag, and Win32WM (direct .zip link).

The first of these, Easy Window Dragging, is the most simple. You'll need AutoHotkey to run it. If you want, you can use the AHK2Exe compiler included with AHK; this will make an .exe you can run without needing AutoHotkey. I think performance may be slightly better when it's run uncompiled, but the difference may be negligible. The functions of the script are (quote from script comments):

Hold down
; the ALT key and LEFT-click anywhere inside a window to drag it to a new
; location; 2) Hold down ALT and RIGHT-click-drag anywhere inside a window
; to easily resize it; 3) Press ALT twice, but before releasing it the second
; time, left-click to minimize the window under the mouse cursor, right-click
; to maximize it, or middle-click to close it.

There is a tray icon that allows you to exit the program.

AltDrag has a few more features. Quote from the info file:

Drag windows with the mouse when pressing the alt key.
You can use the middle or right mouse button to resize windows.
If you press the shift key while you drag or resize, the window will stick to other windows.
You can double-click a window to maximize it.
You can double-click with the middle mouse button to roll-up windows.

There is also an experimental feature to make it stick to other windows (what does that mean?) along with another option in the .ini file to make Alt+right-click minimize windows. Tray icon included.

Win32WM does not have a tray icon, so you'll have to end its process with Task Manger in order to stop it. In addition to alt-dragging, it has some keyboard driven window management functions. Quote from the readme:

Maximize vertically Win+V
Maximize horizontally Win+H
Maximize window Win+X
Minimize window Win+Z
Send window to background Win+B

It also has some other functions, such as snapping windows to desktop edges when alt-dragging, but they appear to need VirtuaWin (what Win32WM was originally made for) to be enabled.

One other thing to note about Win32WM: it appears to send click and drag mouse events to the window it's moving - repeatedly. Take a look at this blank canvas in GIMP that I dragged around with it:

Win32WM_dragged_GIMP_image

And another note: while the CPU usage of these applications is mostly not that bad, the CPU usage of programs being dragged around on the screen can spike as well as applications behind those you are dragging. I think this has something to do with the way Windows draws windows and I also think it may be different in Vista and beyond. However, this is mostly with violent thrashing of the window about the screen; gentler window dragging should have quite acceptable CPU usage.

In any case, take your pick, and enjoy.

Update: June 12, 2009: Just a quick note: windows don't seem to drag using this method when they are not responding (hung). I think this is probably also something to do with the way Windows draws windows, and it also may be different in Vista. And as far as I remember, hung windows drag fine in Linux.

Update: November 1, 2009: I've switched to using KDE Mover-Sizer, a modified version Easy Window Dragging. It supports window snapping and is distributed ready to go in an .exe. Go read the page if you don't understand that. And let me reiterate one last time - alt dragging is an awesome time-sanity-saver.

2 comments:

Anonymous said...

Which of these are compatible with Windows 7?

Nathaniel said...

I know KDE Mover-Sizer definitely is, at least by report of the author. That probably means Easy Window Dragging is, too, but I'd just use KDEMS because that's the updated version. Plus it's the one I like best. The edge snapping is nice.