This is a long imperfect record of my tests and results. I just went to an empty desktop and pressed nothing but the buttons: - keybind for iceweasel - super+W - keybind for xfce4-terminal - super+T - ALT+F4 in various sequences. (In between this, I have to admit, I was doing CTRL+ALT+LEFT, typing in the browser text box to record, and doing CTRL+ALT+RIGHT again, and also maybe clicking or scrolling a few times. So that could be a confounding variable. But it certainly didn't seem to affect anything at least while I was doing the first 9 steps, which was quite a while.) 1 xfterm then iceweasel, proper behavior (raise and focus xfterm) 2 alt+f4 both 3 iceweasel then xfterm, proper behavior (raise and focus iceweasel) 4 alt+f4 both 5 repeat steps 1-2 many times, still proper behavior 6 repeat steps 3-4 many times, still proper behavior 7 repeat steps 1-4 many times, still proper behavior 8 repeat step 1 twice, then repeat step 2 twice, still proper behavior 9 repeat step 3 twice, then repeat step 4 twice, still proper behavior 10 do about 7 xfterm, then an iceweasel, proper behavior 11 alt+f4 all 12 do about 7 iceweasel, then an xfterm, proper behavior so far 13 alt+f4 3 or 4 times, then an xfterm, proper behavior so far 14 alt+f4 about 3 more times, then an xfterm - MISBEHAVIOR (xfterm was not raised or focused, stayed beneath iceweasel) Now suddenly it was randomly misbehaving in ways that I couldn't predict or reproduce, and I began to lose track of exactly which combinations of steps I was doing. For example: 15 open 3 xfterm, then an iceweasel - MISBEHAVIOR (iceweasel stayed beneath an xfterm) 16 alt+f4 all 17 repeat steps 13-14, proper behavior this time 18 keep repeating steps 13-14, proper behavior 19 do many iterations of various among steps 1-12, proper behavior throughout 20 repeat steps 12-14 - MISBEHAVIOR (exactly as before) 21 repeat steps 13-14, no misbehavior, totally proper 22 do a few iterations of various among steps 1-12, proper behavior 23 repeat steps 12-13 - MISBEHAVIOR (didn't even have to do 14 this time) 24 alt+f4 a few more times, xfterm, still MISBEHAVIOR, then alt+f4 all 25 various iterations, all proper behavior 26 repeat steps 12-13 - MISBEHAVIOR 27 various iterations, proper behavior 28 xfterm, iceweasel, xfterm - MISBEHAVIOR, alt+f4 all 29 xfterm, iceweasel, xfterm - proper behavior, alt+f4 all 30 various iterations, proper behavior 31 xterm, iceweasel - MISBEHAVIOR 32 many various iterations of 1-12, all proper behavior Then I tested a generalized pattern to trigger, based on steps 12-14: 33 open 7 xfterms, then iceweasel - proper behavior 34 alt+f4 3 times, then iceweasel - MISBEHAVIOR 35 alt+f4 all, then open 7 xfterms 36 alt+f4 3 times, then open iceweasel - MISBEHAVIOR 37 open 2 xfterms, then alt+f4 once, then open iceweasel - MISBEHAVIOR 38 open 7 xfterms, then iceweasel - proper behavior, alt+f4 all 39 repeat step 37 - MISBEHAVIOR Then I did all kinds of other things, not just with those keys, and then repeated step 37 again: still misbehavior.