GNOME Bugzilla – Bug 95520
workspace switch could be smoother
Last modified: 2004-12-22 21:47:04 UTC
This is most visible on slower, memory-starved machines. When switching workspaces, the windows are mapped and unmapped in a seemingly random order. This means the windows being mapped get multiple expose events, and (probably worse) the windows being unmapped get expose events when windows in front of them get unmapped and apps spend time repainting when they're just going to get unmapped in a few more milliseconds. I believe if the windows were unmapped in stacking order back-to-front and then the new workspace windows mapped in stacking order front-to-back, the switch would go more smoothly and more quickly. (I admit I haven't read the code to find out if metacity even knows the stacking order.)
Seems like a good idea. In idle_calc_showing, instead of just checking each window and doing the map/unmap, we should build a list of all windows to map, build a list of all windows to unmap, sort by stacking (see sort function in stack.c), then actually do the maps/unmaps. Should be pretty easy. Others have suggested grabbing the server while doing all this, but I bet with this change grabbing the server won't be needed (or won't help that much anymore).
Done