Author: rwhitcomb Date: Tue Nov 5 00:15:37 2013 New Revision: 1538840 URL: http://svn.apache.org/r1538840 Log: PIVOT-928: Always position popup menus so they stay within the screen bounds. The existing code only did it for "context" menus, which meant that second-level context menus (which aren't marked as such) could still stray outside the bounds.
This change means all popup menus (which could include regular menus as well as context menus) will get positioned inside the screen bounds. Modified: pivot/branches/2.0.x/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java Modified: pivot/branches/2.0.x/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java?rev=1538840&r1=1538839&r2=1538840&view=diff ============================================================================== --- pivot/branches/2.0.x/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java (original) +++ pivot/branches/2.0.x/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java Tue Nov 5 00:15:37 2013 @@ -235,9 +235,8 @@ public class TerraMenuPopupSkin extends panorama.setScrollTop(0); - if (menuPopup.isContextMenu()) { - ApplicationContext.queueCallback(new RepositionCallback()); - } + // Always ensure that the menu popup fits on the display. + ApplicationContext.queueCallback(new RepositionCallback()); } @Override