Kirix Support Forums

Fix for Show status of floating frames

Please post any wxAUI patches or modifications you've created here. Thanks!

Fix for Show status of floating frames

Postby jhughes on Thu Dec 31, 2009 7:07 am

I'm relatively new to wxAUI, but I've been playing with wxWidgets for a while. There are numerous bugs with the handling of floating framed windows, some of which are difficult to tolerate, so I rolled up my sleeves to try to fix them. The first is a problem when accepting OnShow for a panel that is floating.

Repro steps...
1) Make two separate panels that float and override the virtual Show() function.
2) Close both windows (close meaning hide, not destroy).
3) Show one of the panels through any other means, ie. button or menu item, by changing the panel's .Show(true) and calling Update() on the manager.
4) If you've set breakpoints in both Show() functions, you'll note that BOTH windows will get calls with show==true, and both pane info's will too, although the floating frame would still be hidden for the one that wasn't supposed to be shown. I believe this is a bug. If the panel tracks its shown state internally, say, to toggle a button status that tells if a window is visible or not, it will be incorrect after showing an unrelated window.

The specific change was to recognize that frame->SetPaneWindow(p) actually changes the visible status of the pane info of any window that is floating but has no frame. Well, if you close a floating frame, it loses its frame pointer, so this causes anything to be rebuilt and shown on the next update. So, I cached the shown status just before this call, then reset it afterward. I also slightly changed the logic so that at all times, the p.frame and p.window are kept in sync with the pane info's show settings.

I'm not guarantying this does the right thing in all other possible cases, but in the one that I describe above, I now get a Show(true) followed by a Show(false) for any panel that is recently hidden.

Best,
JH
jhughes
Registered User
 
Posts: 1
Joined: Thu Dec 31, 2009 6:52 am

Re: Fix for Show status of floating frames

Postby R.U.10 on Thu Jan 14, 2010 8:28 am

Take a look on my patch:
http://trac.wxwidgets.org/ticket/11385
it will probably solve some of your problems.
R.U.10
Registered User
 
Posts: 30
Joined: Mon May 21, 2007 9:26 am

Return to wxAUI Patches & Modifications