GNOME Bugzilla – Bug 381127
Should grab the server when switching workspaces
Last modified: 2006-12-03 20:06:07 UTC
This bug is easy to reproduce: - In workspace A, maximize a window. - In workspace B, maximize another window. Put a small non-maximized window on top of B. - Flip between workspaces A and B. When flipping to B, you will see a flash of the desktop background before the big window is repainted. This happens because Metacity lacks two little things that are needed to make switching workspaces as smooth as possible: 1. It needs to grab the server while windows are being hidden and shown. 2. It needs to first show the windows to be shown in front-to-back order, and then hide the windows to be hidden in back-to-front order. (2) Minimizes the number of expose events that get generated for windows. (1) ensures that this really happens, given the asynchronous nature of X. The attached patch implements this.
Created attachment 77462 [details] [review] metacity-workspace-switch-server-grab.diff
Grabbing the server is a little extreme IMO, though if it is a noticeable improvement maybe it's worth it.
FVWM and Sawfish do the same thing, by the way.
The patch looks fine to me, showing before hiding makes sense. If the grab server improvement is noticeable then why not go for it.
Thanks! Committed to HEAD. 2006-12-03 Federico Mena Quintero <federico@novell.com> Fix http://bugzilla.gnome.org/show_bug.cgi?id=381127: * src/window.c (idle_calc_showing): Grab the server while the windows are being shuffled. First show the windows to be shown, and then hide the windows to be hidden, in order to minimize the number of expose events.