A docked toolbar, say on the top, when you drag it to the left to line it up, it will instead dock to the left. This fix makes it so if you drag a docked toolbar (well actually anything which it does not seem to be bad behavior so far with docked windows but time and lots of docked windows at once will tell) to one of the four corners will not cause an orientation change. If anyone knows of better ways to improve this behavior, let me know.
wxFrameManager::DoDop - Old
- Code: Select all
if (pt.x < layer_insert_offset &&
pt.x > layer_insert_offset-auiLayerInsertPixels)
{
...
}
else if (pt.y < layer_insert_offset &&
pt.y > layer_insert_offset-auiLayerInsertPixels)
{
...
}
else if (pt.x >= cli_size.x - layer_insert_offset &&
pt.x < cli_size.x - layer_insert_offset + auiLayerInsertPixels)
{
...
}
else if (pt.y >= cli_size.y - layer_insert_offset &&
pt.y < cli_size.y - layer_insert_offset + auiLayerInsertPixels)
{
...
}
wxFrameManager::DoDop - New
- Code: Select all
if (pt.x < layer_insert_offset &&
pt.x > layer_insert_offset-auiLayerInsertPixels)
{
if (!target.IsFloating() && (target.dock_direction == wxAUI_DOCK_TOP || target.dock_direction == wxAUI_DOCK_BOTTOM ))
return false;
...
}
else if (pt.y < layer_insert_offset &&
pt.y > layer_insert_offset-auiLayerInsertPixels)
{
if (!target.IsFloating() && (target.dock_direction == wxAUI_DOCK_LEFT || target.dock_direction == wxAUI_DOCK_RIGHT ))
return false;
...
}
else if (pt.x >= cli_size.x - layer_insert_offset &&
pt.x < cli_size.x - layer_insert_offset + auiLayerInsertPixels)
{
if (!target.IsFloating() && (target.dock_direction == wxAUI_DOCK_TOP || target.dock_direction == wxAUI_DOCK_BOTTOM ))
return false;
...
}
else if (pt.y >= cli_size.y - layer_insert_offset &&
pt.y < cli_size.y - layer_insert_offset + auiLayerInsertPixels)
{
if (!target.IsFloating() && (target.dock_direction == wxAUI_DOCK_LEFT || target.dock_direction == wxAUI_DOCK_RIGHT ))
return false;
...
}