linuxmint / xapp

Cross-desktop libraries and common resources
GNU Lesser General Public License v3.0
126 stars 44 forks source link

XAppStatusIcon menu size and warnings #140

Closed Axel-Erfurt closed 3 years ago

Axel-Erfurt commented 3 years ago

Linux Mint 20.2, python 3.8.10

Menus are only the right size when called up the second time and I get these messages:

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

(XAppStatusIcon.py:22534): Gtk-CRITICAL **: 18:32:08.110: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

Example Code: XAppStatusicon.py

mtwebster commented 3 years ago

What desktop is this on? I can't reproduce in cinnamon.

Are you testing it on the top or bottom panel, and do you have multiple monitors (potentially with different sizes or scaling)?

Axel-Erfurt commented 3 years ago

Desktop is xfce, one monitor 1280x1024, XAppStatusicon is in the top panel (I only use one panel)

Axel-Erfurt commented 3 years ago

Maybe it has to do with changes in xfce 4.16.

Appindicator3 and PyQt5 Systray no longer work as before. (scroll-event and middle-click no longer work there.)

mtwebster commented 3 years ago

Ok I'll have a look on xfce - it's possible this could happen if our panel applet is giving the wrong coordinate/orientation info to the program (XAppStatusIcon uses that to know where to position the menu).

Axel-Erfurt commented 3 years ago

The position of the menu is ok, width and height is on first click wrong (no menu text visible).

The height is only a few pixels. On next click all is ok.

Axel-Erfurt commented 3 years ago

I'm sorry, I found out today that it was due to the theme used.