I'm just playing around with `Window.GetUpdateRegion` and
`RegionIterator` in order to know exactly where my window has been
damaged so I'll know what to redraw and won't redraw too much. I set
up a little program to draw random colorful rectangles on all the
rects that I get from `RegionIterator(self.GetUpdateRegion())`.
When I drag the frame to the edge of the screen and then back to the
center, I see that the part that was hidden is now a different color--
Which is exactly what I expected, and that's great. But when I hover
my mouse over the window, it repaints the whole window in a random
color, from which I conclude that the entire window was considered
damaged!
Is this true? Does mouse hover cause redrawing of entire window?
It shouldn't, but I suppose that it's possible depending on things like how the system is drawing the cursor, managing the backing store of the display, video driver implementation, etc.
···
On 5/19/10 11:48 AM, cool-RR wrote:
Hey,
I'm just playing around with `Window.GetUpdateRegion` and
`RegionIterator` in order to know exactly where my window has been
damaged so I'll know what to redraw and won't redraw too much. I set
up a little program to draw random colorful rectangles on all the
rects that I get from `RegionIterator(self.GetUpdateRegion())`.
When I drag the frame to the edge of the screen and then back to the
center, I see that the part that was hidden is now a different color--
Which is exactly what I expected, and that's great. But when I hover
my mouse over the window, it repaints the whole window in a random
color, from which I conclude that the entire window was considered
damaged!
Is this true? Does mouse hover cause redrawing of entire window?
I’ve tested this app now on XP, Win 7, and the latest Ubuntu. Do you think the three of them do this mistake? Is it possible this happens because the window is a PyAUI pane?
Ram.
···
On Thu, May 20, 2010 at 8:34 AM, Robin Dunn robin@alldunn.com wrote:
On 5/19/10 11:48 AM, cool-RR wrote:
Hey,
I’m just playing around with Window.GetUpdateRegion and
RegionIterator in order to know exactly where my window has been
damaged so I’ll know what to redraw and won’t redraw too much. I set
up a little program to draw random colorful rectangles on all the
rects that I get from RegionIterator(self.GetUpdateRegion()).
When I drag the frame to the edge of the screen and then back to the
center, I see that the part that was hidden is now a different color–
Which is exactly what I expected, and that’s great. But when I hover
my mouse over the window, it repaints the whole window in a random
color, from which I conclude that the entire window was considered
damaged!
Is this true? Does mouse hover cause redrawing of entire window?
It shouldn’t, but I suppose that it’s possible depending on things like how the system is drawing the cursor, managing the backing store of the display, video driver implementation, etc.
On 5/19/10 11:48 AM, cool-RR wrote:
Hey,
I'm just playing around with `Window.GetUpdateRegion` and
`RegionIterator` in order to know exactly where my window has been
damaged so I'll know what to redraw and won't redraw too much. I set
up a little program to draw random colorful rectangles on all the
rects that I get from `RegionIterator(self.GetUpdateRegion())`.
When I drag the frame to the edge of the screen and then back to the
center, I see that the part that was hidden is now a different
color--
Which is exactly what I expected, and that's great. But when I hover
my mouse over the window, it repaints the whole window in a random
color, from which I conclude that the entire window was considered
damaged!
Is this true? Does mouse hover cause redrawing of entire window?
It shouldn't, but I suppose that it's possible depending on things
like how the system is drawing the cursor, managing the backing
store of the display, video driver implementation, etc.
--
Robin Dunn
I’ve tested this app now on XP, Win 7, and the latest Ubuntu. Do you
think the three of them do this mistake? Is it possible this happens
because the window is a PyAUI pane?
Perhaps. For example if there is a Refresh that happens (directly or indirectly) in response to mouse motion events then it could behave like what you are seeing. To double check you could create a simple app with just a frame and a panel and watch when the panel is getting paint events.