GNOME Bugzilla – Bug 771033
GtkStatusIcon cannot show activate menu in VirtualBox since 3.21.2
Last modified: 2018-05-02 17:30:10 UTC
Created attachment 335062 [details] Test program After Gdk dropped Xinerama and use GdkMonitor, GtkStatusIcon cannot show its activate menu. I confirmed this problem happens in Gdk 3.21.2 in XFCE and LXDE but not in Gdk 3.21.1
It seems to work when trying this in qemu.
Created attachment 335070 [details] Screenshot of GtkStatusIcon activate menu It seems the problem happens in VirtualBox guest only. The top left in the screenshot shows the broken menu and the following message is output: ** BUG *** In pixman_region32_init_rect: Invalid rectangle passed Set a breakpoint on '_pixman_log_error' to debug
+ Trace 236642
What does the gtk inspector say about monitors in this situation (in the general tab) ?
(In reply to Matthias Clasen from comment #3) > What does the gtk inspector say about monitors in this situation (in the > general tab) ? I can see the following information: GTK+ Version 3.21.5 GDK Backend X11 Display :1.0 RGBA visual v Composited v Monitor 0 Geometry 0 x 0 at 0, 0 Size 203 x 203 mm^2 Primary v Refresh rate unknown Subpixel layout unknown GL Version GLX 1.4 GL Vendor Mesa Project and SGI GLX_ARB_create_context_profile v GLX_EXT_texture_from_pixmap v GLX_ARB_multisample v GLX_EXT_visual_rating v Seat 0 Pointer, Keyboard Virtual core XTEST keyboard Keyboard Power Button Keyboard Sleep Button Keyboard Video Bus Keyboard AT Translated Set 2 keyboard Keyboard Virtual core XTEST pointer Mouse Virutal USB Tablet Mouse Axes X, Y ImExPS/2 BYD TouchPad Mouse
It seems the problem is not GtkStatusIcon only but also any windows cannot set the coordinates. Even if I set GTK_WIN_POS_CENTER, The window position is (0, 0) but not the center. int main (int argc, char *argv[]) { GtkWidget *popup; gtk_init (&argc, &argv); popup = g_object_new (GTK_TYPE_WINDOW, "type", GTK_WINDOW_POPUP, "window-position", GTK_WIN_POS_CENTER, NULL); GtkWidget *label = gtk_label_new ("test"); gtk_container_add (GTK_CONTAINER (popup), label); gtk_widget_show_all (popup); gtk_main (); return 0; }
Created attachment 335210 [details] [review] Patch to enable RandR on VirtualBox OK, I found the root cause. On standalone, XRROutputInfo->name is not "default". On VirtualBox guest, XRROutputInfo->name is "default" but RANDR 1.5 is enabled. This patch fixes both the GtkStatusIcon activate menu and the position of the centered popup menu. I'm interested in what is the usable data compatible in RandR 1.2+.
I've reverted this change, since it was causing problems with several X servers.
Seems the current GTK does not have the original bug even if the change is reverted. I will comment later if I find any problems.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/667.