x11:  slightly improve what happens when window closes
x11:  slightly improve what happens when window closes

tscholl2/smc,sagemathinc/smc,tscholl2/smc,DrXyzzy/smc,tscholl2/smc,tscholl2/smc,sagemathinc/smc,DrXyzzy/smc,DrXyzzy/smc,tscholl2/smc,sagemathinc/smc,DrXyzzy/smc,sagemathinc/smc