https://bugs.documentfoundation.org/show_bug.cgi?id=138425

--- Comment #1 from Thomas Viehmann <[email protected]> ---
I think I found the root cause of my problem.

VCL GTK (in contrast to X11 and apparently Windows) pre-activates popup menus
in GtkSalMenu::UpdateFull by calling GtkSalMenu::ActivateAllSubmenus defined
here:

https://git.libreoffice.org/core/+/406e1d123500b1c40a32055c3876ab06e88370e8/vcl/unx/gtk3/gtk3gtksalmenu.cxx#1206

This roughly does (excuse my using of Python as pseudocode):

def activate_all_submenus(self):
  for i in self.menuitems:
    if i.has_submenu:
      activate(i.submenu)
      i.submenu.activate_all_submenus()

but this, called on the main menu, does not activate the main menu itself!

Changing the logic to

def activate_all_submenus(self):
  activate(self)
  for i in self.menuitems:
    if i.has_submenu:
      i.submenu.activate_all_submenus()

makes my usecase work.

I'll submit a patch changing this.

I haven't discovered yet where the VCL tests would live, so I'm not entirely
sure how I would design a test case and where I would put it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to