Skip to content

Fix context menu automatically activates bottom entry when opening to the top

tea ☆ requested to merge tea/blackbox:context-menu-position-fix into main

Fixes the issue in #302 (closed).

This changes the behavior of the context menu so it looks and behaves the same way it does in other GTK4 applications (like Nautilus):

  • arrow is not displayed
  • popover is aligned to the start of the rectangle it's pointing to

I've tested that the behavior described in the issuer no longer happens with the four possible cases where the popover could appear:

  • popover opening to the bottom right (default)
  • popover opening to the top right (when there's not enough space to the bottom)
  • popover being moved to the left (when there's not enough space to the right)
  • popover opening to the top and being moved to the left (when there's not enough space on to bottom and right)

Merge request reports