This is especially important for multiple monitor setups in which the old code
could result in false positives and suggest docking a window on a wrong
display.
Closes #10612.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67740
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if (pt.x < layer_insert_offset &&
if (pt.x < layer_insert_offset &&
- pt.x > layer_insert_offset-auiLayerInsertPixels)
+ pt.x > layer_insert_offset-auiLayerInsertPixels &&
+ pt.y > 0 &&
+ pt.y < cli_size.y)
{
int new_layer = wxMax(wxMax(GetMaxLayer(docks, wxAUI_DOCK_LEFT),
GetMaxLayer(docks, wxAUI_DOCK_BOTTOM)),
{
int new_layer = wxMax(wxMax(GetMaxLayer(docks, wxAUI_DOCK_LEFT),
GetMaxLayer(docks, wxAUI_DOCK_BOTTOM)),
return ProcessDockResult(target, drop);
}
else if (pt.y < layer_insert_offset &&
return ProcessDockResult(target, drop);
}
else if (pt.y < layer_insert_offset &&
- pt.y > layer_insert_offset-auiLayerInsertPixels)
+ pt.y > layer_insert_offset-auiLayerInsertPixels &&
+ pt.x > 0 &&
+ pt.x < cli_size.x)
{
int new_layer = wxMax(wxMax(GetMaxLayer(docks, wxAUI_DOCK_TOP),
GetMaxLayer(docks, wxAUI_DOCK_LEFT)),
{
int new_layer = wxMax(wxMax(GetMaxLayer(docks, wxAUI_DOCK_TOP),
GetMaxLayer(docks, wxAUI_DOCK_LEFT)),
return ProcessDockResult(target, drop);
}
else if (pt.x >= cli_size.x - layer_insert_offset &&
return ProcessDockResult(target, drop);
}
else if (pt.x >= cli_size.x - layer_insert_offset &&
- pt.x < cli_size.x - layer_insert_offset + auiLayerInsertPixels)
+ pt.x < cli_size.x - layer_insert_offset + auiLayerInsertPixels &&
+ pt.y > 0 &&
+ pt.y < cli_size.y)
{
int new_layer = wxMax(wxMax(GetMaxLayer(docks, wxAUI_DOCK_RIGHT),
GetMaxLayer(docks, wxAUI_DOCK_TOP)),
{
int new_layer = wxMax(wxMax(GetMaxLayer(docks, wxAUI_DOCK_RIGHT),
GetMaxLayer(docks, wxAUI_DOCK_TOP)),
return ProcessDockResult(target, drop);
}
else if (pt.y >= cli_size.y - layer_insert_offset &&
return ProcessDockResult(target, drop);
}
else if (pt.y >= cli_size.y - layer_insert_offset &&
- pt.y < cli_size.y - layer_insert_offset + auiLayerInsertPixels)
+ pt.y < cli_size.y - layer_insert_offset + auiLayerInsertPixels &&
+ pt.x > 0 &&
+ pt.x < cli_size.x)
{
int new_layer = wxMax( wxMax( GetMaxLayer(docks, wxAUI_DOCK_BOTTOM),
GetMaxLayer(docks, wxAUI_DOCK_LEFT)),
{
int new_layer = wxMax( wxMax( GetMaxLayer(docks, wxAUI_DOCK_BOTTOM),
GetMaxLayer(docks, wxAUI_DOCK_LEFT)),