Kirix Support Forums

wxAuiFloatingFrame bug's fix

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

wxAuiFloatingFrame bug's fix

Postby HzD_Byte on Thu Sep 04, 2008 12:15 pm

I found bug in wxAUI with fixed and floating panes that causes wx crashes on some machines (when undocking Toolbar, for example).
There is

wxAuiFloatingFrame(wxWindow* parent,
wxAuiManager* owner_mgr,
const wxAuiPaneInfo& pane,
wxWindowID id = wxID_ANY,
long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT |
wxCLIP_CHILDREN
);

constructor, with

: wxAuiFloatingFrameBaseClass(parent, id, wxEmptyString,
pane.floating_pos, pane.floating_size,
style |
(pane.HasCloseButton()?wxCLOSE_BOX:0) |
(pane.HasMaximizeButton()?wxMAXIMIZE_BOX:0) |
(pane.IsFixed()?0:wxRESIZE_BORDER)
)

implementation (there is a "pane.IsFixed()?0:wxRESIZE_BORDER" check, but wxRESIZE_BORDER always here in declaration).

And there is the same (unneeded) code in wxAuiFloatingFrame::SetPaneWindow for wxRESIZE_BORDER flag:

if (pane.IsFixed())
{
SetWindowStyleFlag(GetWindowStyleFlag() & ~wxRESIZE_BORDER);
}

that called from constructor..
Attachments
auiPatch.zip
Patch for wxAuiFloatingFrame
(617 Bytes) Downloaded 979 times
HzD_Byte
Registered User
 
Posts: 15
Joined: Sun Feb 12, 2006 1:03 am

Return to wxAUI Patches & Modifications