Code review comment for lp://qastaging/~bowmore/unity/fix_icon_workarea_issues

Revision history for this message
Bowmore (bowmore) wrote :

Made a recheck of the panelcontroller part.

window->InputWindowEnableStruts(true)
-------------------------------------
Calls EnableStruts(true) to enable struts for the panel basewindow that in turn calls SetStruts.
SetStruts then uses the current geometry (geometry_) in nux which here still holds the basewindow default geometry (100,100,320,200) that will create a top strut for that basewindow with the height of 300px acc to XInputWindow::GetStrutsData(). This is wrong!

window->SetGeometry(geo)
------------------------
Updates the geometry (geometry_) in nux to the panel's geometry and calls SetStruts() again as struts is now enabled.
SetStruts then uses the current geometry (geometry_) which here now holds the panel's geometry and creates a correct top strut overwriting the previous top strut setting for that basewindow. Fortunally this works as the basewindow geometry also happens to result in a top strut, otherwise we would end up with two struts for that basewindow!

The intension with the fix was to first call SetGeometry to update the basewindow geometry. As struts is not yet enabled InputWindowEnableStruts(true) is then required to enable struts to set the strut for that basewindow. Not sure however what conflict this fix causes.

« Back to merge proposal