-
-
Notifications
You must be signed in to change notification settings - Fork 616
Closed
Labels
Description
Hi,
We are recently updating our pywebview version from 5.4 to 6.1. We are noticing the whole menu bar is missing in ubuntu24 but works just fine in Windows and MacOS.
I spent some time looking into this and found that
pywebview/webview/platforms/gtk.py
Line 729 in eeea4b4
| if _state['menu']: |
will always
None and hence now showing anything. I then look into where _state['menu'] is being set.
Line 300 in eeea4b4
| if menu: |
This chunk of setting the _state['menu'] is after the guilib = initialize(gui), and hence gtk is getting None. The fix here will be to move the whole state menu chunk up before guilib being initialised.
Before:
After:
Method to reproduce:
- Clean Ubuntu
2422 (should be same for 24) - Install pywebview 6.1
- Run menu example https://pywebview.flowrl.com/examples/menu.html
The fix does not break MacOs version.
I don't have a Windows on hand, so I can't test that, but I suspect it should be fine.
Reactions are currently unavailable