Re: Fix, NSView (-releaseGState)

2010-09-24 Thread Fred Kiefer
Thank you for testing this. I tried to fix it by keeping the value of _allocate_gstate in a temporary variable. Could you please give that new code a try? Thanks Fred Am 24.09.2010 03:43, schrieb Georg Fleischmann: > Hallo Fred, > > I just testes GNUstep GUI from yesterday with Cenon, and now al

Re: Fix, NSView (-releaseGState)

2010-09-23 Thread Georg Fleischmann
Hallo Fred, I just testes GNUstep GUI from yesterday with Cenon, and now all graphic windows are pitch black, no contents at all. > _allocate_gstate will change its value when the view moves to another > window. Application code will have to set this again. If I remove the [self releaseGState]

Re: Fix, NSView (-releaseGState)

2010-09-15 Thread Fred Kiefer
Should be in SVN now. As the logic of undefining a gstate is now a bit more complicated I rather call this method from _viewWillMoveToWindow: instead of duplicating the code. This has the drawback that _allocate_gstate will change its value when the view moves to another window. Application code wi

Re: Fix, NSView (-releaseGState)

2010-09-13 Thread Georg Fleischmann
Hi Fred, > if (_gstate) > if (_window) >GSUndefineGState([_window graphicsContext], _gstate); > _gstate = 0; I added this at the beginning of _viewWillMoveToWindow: and played with some graphic windows in Cenon. It will crash, if there is a _gstate but _window has no graphicsContext, which

Re: Fix, NSView (-releaseGState)

2010-09-11 Thread Fred Kiefer
Hi Georg, thank you for this patch. It surely is correct and I will add it. But as you already pointed out there may be a deeper problem here. I think that we should always clean up the gstate when the window for a view changes, that is in the method _viewWillMoveToWindow:. Something like: if (_g

Fix, NSView (-releaseGState)

2010-09-11 Thread Georg Fleischmann
Hi, here is a small patch for NSView (SVN 2010-09-10 and before) to prevent a crash in Cenon when closing a Graphic Window. The same code of Cenon works on Apple, so I suspect it's an issue with GNUstep. The crash is in NSView, which has a gstate but no _window (_window = nil) to get the graphi