elixir-desktop / desktop-example-app

Elixir Sample App using the Desktop library with LiveView to create a desktop app
MIT License
238 stars 31 forks source link

Empty context menu in KDE #17

Open jn-jairo opened 1 year ago

jn-jairo commented 1 year ago

The context menu is empty in KDE, I use kubuntu 20.04, also tried kubuntu 22.04, and ubuntu, in ubuntu it works fine, but in kde it is always empty no matter the version, also tried to compile the wx to the latest version but the bug continues.

image

OS: Kubuntu 20.04 Elixir: 1.15.4 Erlang: 25.3

The buttons work as expected, but the text is empty.

dominicletz commented 1 year ago

Thanks for reporting, I'm definitely not happy the whole system tray API implementation on linux. If you have a suggestion there let me know. On Linux there is already one Fallback method implemented to use DBUS -- This though might introduce bugs by itself. You can try to specify the environment variable export USE_DBUS_MENU=false before starting your app to see if not using DBUS makes anything better.

jn-jairo commented 1 year ago

Thanks for reporting, I'm definitely not happy the whole system tray API implementation on linux. If you have a suggestion there let me know. On Linux there is already one Fallback method implemented to use DBUS -- This though might introduce bugs by itself. You can try to specify the environment variable export USE_DBUS_MENU=false before starting your app to see if not using DBUS makes anything better.

The export USE_DBUS_MENU=false worked thanks, the texts appear now, it is a little buggy with the auto hide task bar, when click it hides the task bar and the below part of the context menu doesn't respond to click in the area where the task bar was, in electron when I click to open the context menu the task bar stays and everything else works fine with the context menu, maybe you could look at how electron makes the system tray.

I am trying the available methods to make a webview app from a phoenix/elixir site, electron works fine for desktop, but I didn't tried to pack the elixir app inside the electron release package yet, an elixir integration with electron and cordova could help, because the target is to deliver a phoenix/elixir app using a webview like system, and electron/cordova already do it, it is just missing the elixir integration.

I am currently working in other parts of the project now, when I come back to that I may try to integrate phoenix/elixir with electron/cordova using the elixir-desktop as a reference, just hope I have the knowledge needed for that task, I am new to elixir, electron and cordova, hahaha, ambitious plans, let's see how it goes.

dominicletz commented 1 year ago

I agree an environment like electron (or Tauri for that matter) would be great to use. Electron at least seems to be better supported in general than wxWidgets that we're using at the moment. That said, it's a pretty major effort and involves a couple of new challenges - but let me know if you make any headway on that.