linuxmint / wayland

All issues related to Wayland (Cinnamon, XApp, tools etc..)
44 stars 0 forks source link

Cinnamon 6 Wayland tray icon menu issues #43

Open RedBearAK opened 6 months ago

RedBearAK commented 6 months ago

Distribution

Mint 21.3

Package version

6.0.4

Graphics hardware in use

QXL in a QEMU/KVM virtual machine

Frequency

Always

Bug description

I'm testing in the "experimental" Wayland session on Cinnamon 6, on Mint 21.3. I have a small app written in Python, that uses gi.repository to put an icon in the indicator tray, with a menu showing various functions and a few submenus.

This same little tray icon app works OK in quite a few different Linux desktop environments that have support for standard indicator trays, including stock GNOME when you add the "AppIndicator" extension or similar. KDE Plasma 5 and 6, GNOME going back to 3.32 at least and up to GNOME 45, LXQt, LXDE, Cinnamon's X11 session, Hyprland, sway, etcetera. The tray icon and menu work in all these environments and more.

In this case, in the Wayland session on Cinnamon 6, the menu that appears when clicking on the tray icon ends up showing itself way across the screen in the top-left quadrant of the screen (at 1080p resolution in the VM). The indicator tray is of course on the bottom-right when the task bar is at the bottom of the screen.

When the tray icon menu is visible, an icon with a generic "gear" image appears on the task bar, with the label when I hover over it showing "xapp-sn-watcher". It is as if the window manager is treating the tray icon menu as its own real "window", rather than just a pop-up dialog.

If I don't choose any item on the menu, I can make the menu it go away by hitting the Escape key. Then it will reappear if I click on the tray icon again.

If I choose to invoke any item in the menu, the item will work correctly, but then the tray icon menu will never appear again until I restart the indicator icon app (which automatically kills the existing process and replaces it, using a lock file to make sure multiple icons don't appear).

I've tried running the app in a terminal to see if any errors show up during this process, either when invoking a menu item or when trying to show the menu again after that. No errors ever appear in the terminal.

I also tried following the systemd journal to see if any debugging messages show up from the window manager. Nothing appeared during the process of triggering the problem.

Unfortunately that means nothing is available to attach, and I have no further information about what exactly is going wrong.

All other aspects of my project seem to work fine in the Cinnamon 6 Wayland session.

Here is my project repo in case someone wants to look at the code for the tray icon app:

https://github.com/RedBearAK/toshy

The file that creates the tray icon is toshy_tray.py.

Steps to reproduce

  1. Install my project (Toshy). It will add two apps to the menu, and should automatically run the tray icon app at login after rebooting. The tray icon app can be run again any time either from the "Toshy Tray Icon" application menu item, or from a terminal with the command "toshy-tray". It will replace the existing tray icon with a new one each time.

  2. Log into the Cinnamon 6 Wayland session.

  3. Click on the Toshy tray icon, and see where the menu appears on the screen. Select any menu item. Then try to click on the tray icon again, to see if the menu will appear again.

Expected behavior

Tray icon menu should appear each time the tray icon is clicked, regardless of whether any menu item was invoked, and it should appear "attached" right above the tray icon (if the task bar is at the bottom of the screen). No new icon should appear on the task bar when the menu appears, since it is just a pop-up dialog.

Additional information

No response

RedBearAK commented 6 months ago

I put the wrong video setting originally, it was using QXL, but now I changed it to VirtIO with 3D acceleration enabled, and OpenGL enabled, and it exhibits similar behavior, with the menu still appearing at the same place on the screen (top-left quadrant).

I was able to invoke a menu item and then get the menu to appear one more time before it completely stopped working, but I suspect this is because I performed the actions quickly one after the other. I was not able to get this to repeat after restarting the app, it just stops working immediately after the first menu item is invoked, just like before with QXL.

So there appears to be no real difference from changing the video settings in the VM configuration. At the moment I'm using Virt-Manager to have access to more settings, but I usually use GNOME Boxes to do the initial creation of the VM, since it is much simpler. In case any of that means anything.

WolfMad commented 5 months ago

hi i am having this problem with other tray icon menu for example mint update starting it using the terminal and right clicking the tray icon i get (mintUpdate.py:30825): Gdk-WARNING **: 21:18:51.498: Couldn't map as window 0x55dbaa04d220 as popup because it doesn't have a parent

if i have the mint update window open then some times the menu appear at the bottom left of the mint update window i have also had it appears at the bottom left of my terminal windows and starting mint update with sudo i get the same thing i also get this with steam