Dimanche le 03 juillet 2005, vers 02:19:11 (CEST), Marcelo E. Magallon a écrit:
> > 1. hold down the [Alt] key [...] > > No, I've been trying to reproduce this for a while with no luck. > > Do you have the switch panel enabled? (I don't) Hello Marcelo, What do you call the "switch panel"? If it is the ability to cycle windows with Alt+Tab, I have it enabled. Furthermore, I use the sloppy focus mode. The bug I reported looks like some race condition. Your machine is maybe faster than mine, which makes the bug harder to reproduce for you. I looked at the code, and the culprit seems to be the ProcessPendingEvents() call in function wWorkspaceForceChange of file src/workspace.c (around line 569). With this line, it is possible to have another instance of wWorkspaceForceChange called while the first one is not finished, which leeds to strange behaviour. I am sorry, but I have not enough free time to write a clean patch. As a quick hack, removing the call to ProcessPendingEvents fixes the problem, but I am not sure that it is the right thing to do. If you still want to reproduce the bug, try the following. First, insert a sleep(1) just before the ProcessPendingEvent call in src/workspace.c. Then, proceed as follows (sloppy focus mode seems to be required): 0. open some windows on workspaces 1 and 2, move the mouse so as to have the pointer over a window on both workspaces 1. switch to workspace 1 2. within less than one second, press Alt+2, followed by Alt+1 => note that, while the displayed windows are from workspace 1, the text "Workspace 2" is printed on screen 3. wait 1 or 2 seconds 4. press Alt+2 => normally, you shouldn't see any window. I inserted printf in the code to trace some function calls. Here is what I got. The first number is the value of argument "workspace". The second number, between parentheses, is the value of scr->current_workspace. ENTER wWorkspaceChange 1 (0) ENTER wWorkspaceForceChange 1 (0) before ProcessPendingEvents 1 ENTER wWorkspaceChange 0 (1) ENTER wWorkspaceForceChange 0 (1) before ProcessPendingEvents 0 after ProcessPendingEvents 0 EXIT wWorkspaceForceChange 0 (0) after ProcessPendingEvents 1 EXIT wWorkspaceForceChange 1 (0) <= note the value of scr->current_workspace ENTER wWorkspaceChange 1 (0) ENTER wWorkspaceForceChange 1 (0) before ProcessPendingEvents 1 after ProcessPendingEvents 1 EXIT wWorkspaceForceChange 1 (1) I hope it helps. Arnaud