Skip to content
  • Matthias Clasen's avatar
    Another attempt at fixing menu positioning corner cases · c74ac081
    Matthias Clasen authored
    The code for moving the menu into monitor / workarea was duplicated,
    once for the push-in scenario and once for without. The problem with
    the second case is that we've stored the menu position before adjusting
    it. That made us remember an out-of-monitor position that then later
    triggered _another_ copy of this code in the size-request implementation.
    
    Unify this to only have one copy of code, and only store the menu
    position after adjusting it to be inside the monitor. This fixes both
    statusicon menus that get popped up from the panel, outside the workarea,
    to not have scroll arrows, and the gedit language menu which was not
    placed in the monitor at all after the initial workarea commit.
    
    As a side-effect of this change, we now make large scrolling menus
    occupy the full height of the workarea. Before this change, we were
    keeping either the top or bottom edge put while shrinking the menu
    to fit in the monitor.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=667249
    c74ac081