Problem redrawing views while window resize button is held
Problem redrawing views while window resize button is held
- Subject: Problem redrawing views while window resize button is held
- From: Doug F <email@hidden>
- Date: Wed, 14 Mar 2007 15:01:53 -0400
Hello all,
I'm having a problem with drawing while resizing a window using the
bottom right corner window resize control. Drawing in a regularly
invalidated (setNeedsDisplay:YES) custom view stops while the "window
resize" control is held down (dragged) but not moved.
I have a timer that updates the state of a model (pretend it's an
animation, since the details are irrelevant), running about 60 Hz.
That timer then also invalidates a (custom) view
(setNeedsDisplay:YES) which is then redrawn appropriately. Everything
works fine under ordinary circumstances.
(The timer is registered in the modes NSDefaultRunLoopMode,
NSEventTrackingRunLoopMode, and NSModalPanelRunLoopMode.)
The problem: once I press the window resize control, drawing stops
except when the window size is actually changed at which time it is
redrawn once (or sometimes, twice). The timer is still running in the
background. It seems, however, that whatever event loop the window
goes into does not redraw invalidated views when the resize control
is held but not moved (i.e., you're "resizing" but not actually
changing the size).
I have confirmed (using scaffolded NSLog output) that the view's
drawRect: method is not being called while the button is held down,
so it seems that it is not that the drawing is going to the buffer
and simply not being flushed to the screen.
Does anyone know how I can modify this behavior so that the views are
redrawn whenever they are invalidated even though the resize control
is held?
As an example of the behavior I would like: When watching a .mov in
QuickTime player, if you resize the video window, the video continues
playing as you hold down the resize button, so clearly the view (of
whatever sort) that shows the video is able to have its view
drawRect:'d or whatever.
I appreciate any thoughts on this matter as I have come up blank with
my searches of the documentation and mailing list archives, etc.
Thanks,
Doug
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden