How to prevent redrawing window when resized

2011-11-02 Thread Vojtěch Meluzín
Hi, I'm having a window with just a single custom view in it. The window is resizable and when resized I need the view to be redrawed. But when dragging the corner and resizing the window, OS first fills the window with white, then paints the previous image left bottom and finally asks the view

Re: How to prevent redrawing window when resized

2011-11-02 Thread Vojtěch Meluzín
What you’re seeing is definitely not normal behavior. Either it’s an artifact of the unusual way your app is structured (is this happening within that modal panel?), or you’re doing something unusual when drawing your view. How are you doing the drawing? You should just need to override

Re: How to prevent redrawing window when resized

2011-11-02 Thread Jens Alfke
On Nov 2, 2011, at 1:39 PM, Vojtěch Meluzín wrote: It is then used to get CGContextRef for drawing. What does that mean, exactly? Does anything draw into the view except during the -drawRect: method? —Jens___ Cocoa-dev mailing list

Re: How to prevent redrawing window when resized

2011-11-02 Thread Vojtěch Meluzín
No no, just during the drawRect. I was just explaining how the drawing is done, just in case it matters. The reason is that CGContextRef was used with carbon as well, so the code is more or less the same. Vojtech Dne 2. listopadu 2011 23:18 Jens Alfke j...@mooseyard.com napsal(a): On Nov 2,

Re: How to prevent redrawing window when resized

2011-11-02 Thread Vojtěch Meluzín
Damn, Jens you were right! It's my fault. Sorry for the problems. Vojtech Dne 2. listopadu 2011 23:36 Vojtěch Meluzín meldaproduct...@gmail.comnapsal(a): No no, just during the drawRect. I was just explaining how the drawing is done, just in case it matters. The reason is that CGContextRef