Well, I can reproduce a bug and made a fix for it. 1. How to reproduce: config: --- # Taken from .fvwm2rc # Setup more than 3x3 virtual pages DesktopSize 3x3 # Make emacs start on different page Style Emacs StartsOnPage 0 1 ---
Now I start emacs. It is started on page 0,1. Then I switch to any other page and run: xlock -mode blank & sleep 5; gnuclient gnuclient will create new emacs window and fvwm will place it on page 0,1. This moment xlock crashes with error: X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 12 (X_ConfigureWindow) Resource id in failed request: 0x0 Serial number of failed request: 4168 Current serial number in output stream: 4174 The problem is that xlock fails to check window handle it gets in event, but tries to XRaiseWindow on it. The enclosed patch fixes it. And I couldn't reproduce the bug with patched version. But there are at least one similar place in the xlock code which probably also needs checking.
diff -Nru xlockmore-5.13/xlock/xlock.c xlockmore-fixed/xlock/xlock.c --- xlockmore-5.13/xlock/xlock.c 2004-06-17 10:20:30.000000000 +0800 +++ xlockmore-fixed/xlock/xlock.c 2005-05-22 03:40:32.000000000 +0800 @@ -2770,7 +2770,7 @@ break; case ConfigureNotify: - if (!debug && !inwindow) { + if (!debug && !inwindow && event.xconfigure.window) { XRaiseWindow(display, event.xconfigure.window); }