20050324 test build uploaded

Hi,

A new test build of wxPython has been uploaded to starship.

   Version: 2.5.5.0pre.20050324
   URL: http://starship.python.net/crew/robind/wxPython/daily/20050324
   Changes: http://starship.python.net/crew/robind/wxPython/daily/20050324/CHANGES.html

Have fun!
R'bot

I have attached a small script that demonstrates my problem...
I have a small button on the left that toggles the visibility of the green panel.... it used to work fine :slight_smile: now it is a source for a lot of visual garbage.
Resizing the frame is also a "fun" thing to do.

a lot of visual bugs creeped in my app durring the last releases... most of them fixable by a "minimize-maximize" combo...
It use to be that a Refresh called on the main frame could fix things like this.... not anymore
Am I doing something wrong? How can I fix this?

toggle.py (2.68 KB)

···

On Fri, 25 Mar 2005 07:56:14 +0200, R'bot <rbot@wxpython.org> wrote:

Hi,

A new test build of wxPython has been uploaded to starship.

   Version: 2.5.5.0pre.20050324
   URL: http://starship.python.net/crew/robind/wxPython/daily/20050324
   Changes: http://starship.python.net/crew/robind/wxPython/daily/20050324/CHANGES.html

Have fun!
R'bot

--
Peter Damoc
Warrior Of The Light
http://www.sigmacore.net/

Peter Damoc wrote:

···

On Fri, 25 Mar 2005 07:56:14 +0200, R'bot <rbot@wxpython.org> wrote:

I have attached a small script that demonstrates my problem...
I have a small button on the left that toggles the visibility of the green panel.... it used to work fine :slight_smile: now it is a source for a lot of visual garbage.
Resizing the frame is also a "fun" thing to do.

a lot of visual bugs creeped in my app durring the last releases... most of them fixable by a "minimize-maximize" combo...
It use to be that a Refresh called on the main frame could fix things like this.... not anymore
Am I doing something wrong? How can I fix this?

Thanks for the sample, this is a good test case for the defered sizing issue in wxMSW. It's the first case I've seen where it works better with the defered sizing than without it. The 2.5.5 preivew has it turned off by default. When I turned it back on your sample works perfectly again.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

The sample was a failed attempt to reproduce a bug in my app.
Altho it does show a difference between 2.5.4 and 2.5.5 it still works ok in 2.5.4.
My app shows the visual bug in 2.5.4 too only 2.5.3 seams to be ok.
I stumbled upon this bug late because it was caused by a feature I don't use... it was placed in there for small screens (1024x768) and I'm on a generous 1280x1024.

As I said... IMHO my problem is caused by a lack of propagation of the Refresh.
If I call Refresh on a wx.Window shouldn't that refresh propagate? shouldn't all siblings of that Window refresh themselves?

···

On Fri, 25 Mar 2005 17:48:52 +0200, Robin Dunn <robin@alldunn.com> wrote:

Peter Damoc wrote:

On Fri, 25 Mar 2005 07:56:14 +0200, R'bot <rbot@wxpython.org> wrote:

I have attached a small script that demonstrates my problem...
I have a small button on the left that toggles the visibility of the green panel.... it used to work fine :slight_smile: now it is a source for a lot of visual garbage.
Resizing the frame is also a "fun" thing to do.
a lot of visual bugs creeped in my app durring the last releases... most of them fixable by a "minimize-maximize" combo...
It use to be that a Refresh called on the main frame could fix things like this.... not anymore
Am I doing something wrong? How can I fix this?

Thanks for the sample, this is a good test case for the defered sizing issue in wxMSW. It's the first case I've seen where it works better with the defered sizing than without it. The 2.5.5 preivew has it turned off by default. When I turned it back on your sample works perfectly again.

--
Peter Damoc
Warrior Of The Light
http://www.sigmacore.net/

Peter Damoc wrote:

As I said... IMHO my problem is caused by a lack of propagation of the Refresh.
If I call Refresh on a wx.Window shouldn't that refresh propagate? shouldn't all siblings of that Window refresh themselves?

I assume you mean children?

On Windows Refresh just calls the InvalidateRect API and although the docs don't state it explicitly I think that it only invalidates the window handle it is given. Now on the other hand if the child windows are not being clipped then I suppose that a refresh of a parent would ultimately cause the redraw of the children because they get overwritten by the parent's refresh, and how the WS_CLIPCHILDREN style is used has also changed recently. If I'm reading the code right, the style is always used by default on wxMSW now to further eliminate flicker. Try adding this code in your app's startup and see if that makes the difference (I think it will) and let me know. This might also be the root of the Freeze/Thaw problem. If so then we'll need to do something about the Refresh...

  wx.SystemOptions.SetOptionInt("msw.window.no-clip-children", 1")

···

On Fri, 25 Mar 2005 17:48:52 +0200, Robin Dunn <robin@alldunn.com> wrote:

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Peter Damoc wrote:

As I said... IMHO my problem is caused by a lack of propagation of the Refresh.
If I call Refresh on a wx.Window shouldn't that refresh propagate? shouldn't all siblings of that Window refresh themselves?

I assume you mean children?

oops... my bad English has stroked again :slight_smile: I meant "descendants"... as in children and children's children etc.

On Windows Refresh just calls the InvalidateRect API and although the docs don't state it explicitly I think that it only invalidates the window handle it is given. Now on the other hand if the child windows are not being clipped then I suppose that a refresh of a parent would ultimately cause the redraw of the children because they get overwritten by the parent's refresh, and how the WS_CLIPCHILDREN style is used has also changed recently. If I'm reading the code right, the style is always used by default on wxMSW now to further eliminate flicker. Try adding this code in your app's startup and see if that makes the difference (I think it will) and let me know. This might also be the root of the Freeze/Thaw problem. If so then we'll need to do something about the Refresh...

  wx.SystemOptions.SetOptionInt("msw.window.no-clip-children", 1")

that little option did it... :o)
More flicker less bugs :slight_smile: that's a trade-off I'm willing to live with :slight_smile:

Thanks!

···

On Sat, 26 Mar 2005 10:52:12 +0200, Robin Dunn <robin@alldunn.com> wrote:

On Fri, 25 Mar 2005 17:48:52 +0200, Robin Dunn <robin@alldunn.com> >> wrote:

--
Peter Damoc
Warrior Of The Light
http://www.sigmacore.net/

Peter Damoc wrote:

···

On Sat, 26 Mar 2005 10:52:12 +0200, Robin Dunn <robin@alldunn.com> wrote:

Peter Damoc wrote:

On Fri, 25 Mar 2005 17:48:52 +0200, Robin Dunn <robin@alldunn.com> >>> wrote:

As I said... IMHO my problem is caused by a lack of propagation of the Refresh.
If I call Refresh on a wx.Window shouldn't that refresh propagate? shouldn't all siblings of that Window refresh themselves?

I assume you mean children?

oops... my bad English has stroked again :slight_smile: I meant "descendants"... as in children and children's children etc.

On Windows Refresh just calls the InvalidateRect API and although the docs don't state it explicitly I think that it only invalidates the window handle it is given. Now on the other hand if the child windows are not being clipped then I suppose that a refresh of a parent would ultimately cause the redraw of the children because they get overwritten by the parent's refresh, and how the WS_CLIPCHILDREN style is used has also changed recently. If I'm reading the code right, the style is always used by default on wxMSW now to further eliminate flicker. Try adding this code in your app's startup and see if that makes the difference (I think it will) and let me know. This might also be the root of the Freeze/Thaw problem. If so then we'll need to do something about the Refresh...

    wx.SystemOptions.SetOptionInt("msw.window.no-clip-children", 1")

that little option did it... :o)
More flicker less bugs :slight_smile: that's a trade-off I'm willing to live with :slight_smile:

I'll be starting a new preview build in a little while. Please remove the system option setting and test again with the new build when it is ready. I think that all the Refresh/Freeze/Thaw issues have been resolved.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!