Linux desktop manager Close Window is dangerous.

Bert Freudenberg bert at freudenbergs.de
Fri Aug 31 04:18:38 UTC 2007


On Aug 29, 2007, at 8:32 , Brad Fuller wrote:

> On Wed August 29 2007, Ian Piumarta wrote:
>> This patch disables the title bar quit button (iff your window
>> manager participates in the WM_DELETE_WINDOW protocol) and causes an
>> event of type 6 to be sent to the image (in response to which it
>> should pop open the 'save changes before quit' dialogue -- an SEP).
>>
>> If (1) several people report that this adequately addresses the issue
>> and (2) nobody else has claimed event type 6, then I'll commit the
>> changes and move the event type definition into sq.h next to the  
>> others.
>
> Wow... thanks Ian. And thanks for being consistent with the "quit"
> confirmation within squeak (note my mantis entry for windows:
> http://bugs.squeak.org/view.php?id=6643)
>
> Unfortunately, I'll have to set SVN back up on this machine and build
> (recently wiped and now using gentoo) to check it out. I have no  
> ETA. But,
> I'll do it as soon as I can. If others can check it out, please do.

I folded this into the OLPC VM branch (using event type 5 subtype 2  
as per sq.h):

http://squeakvm.org/cgi-bin/viewcvs.cgi/branches/olpc/platforms/unix/ 
vm-display-X11/sqUnixX11.c?rev=1753&r1=1737&r2=1753

The corresponsing image code is here:

http://tinlizzie.org/updates/etoys/updates/1574WindowEvents-JMM-bf.cs

"Change Set:		WindowEvents-JMM-bf
Date:			30 August 2007
Author:			John McIntosh, Bert Freudenberg

Add WindowEvent handling, based on JMM's Ffenestri-b-4-Events-Morphic. 
1.cs. WindowEvents are dispatched to the World. The #windowClose  
event quits the image after showing a confirmation. This can be  
intercepted by setting a global windowEventHandler on the World."

John's original change set included support for multiple windows,  
this has been stripped out. Support for dispatching and handling  
WindowEvents has been added.

This is potentially useful for other platforms, provided they can be  
made into generating that close event. If they do not generate the  
event it should still be safe to have in the image.

- Bert -





More information about the Squeak-dev mailing list