[ex11] use of Display

Joe Armstrong joe@REDACTED
Fri Jan 23 22:56:10 CET 2004


On Fri, 23 Jan 2004, Vlad Dumitrescu wrote:

> Hi Joe,
> 
> A silly question this time: I think I am too tired this Friday afternoon. :-)
> 
> If I run something like
> 
> Display=sw:start("3.1"),
> Win  = swTopLevel:make(Display, 160, 50, 16#ffffcc),
> 
> Win2 = swTopLevel:make(Display, 260, 50, 16#ffffcc),
> 
> then closing any of the windows will close both of them.
> 
> Is it supposed to be so? If yes, does it mean that the only one top-level window
> should be created per Display? It seems not so comfortable...
> 

This is how X works I was rather surprised by this. 

The X server seems to assume that one window = one socket connection. Kill the 
window by clicking on the window destoy button
then all top level windows die. That's why you'll only ever see one top
level window created in my code.

/Joe


> regards,
> Vlad
> 
> 




More information about the erlang-questions mailing list