GNOME Bugzilla – Bug 771117
gtk3 3.21.5 broke displaying drop-down lists, need to scroll to see contents
Last modified: 2016-09-14 03:53:35 UTC
With gtk3-3.21.4-2.fc25.x86_64, everything worked fine. With gtk3-3.21.5-1.fc25.x86_64, all drop-down lists available in gnome-control-center (e.g. in Power) are broken - if you click on them, they display only an empty list, and the real values are hidden outside of the visible area - you need to scroll to display them. Some of them can't be used at all (the drop-down list under Suspend & Power button - other values can't be displayed even with scrolling). See the video to showcase the problem. This happens on Wayland, but does not happen when I run gnome-control-center with GDK_BACKEND=x11 GTK_CSD=1, and did not happen in previous gtk version (tested with downgrade). control-center-3.20.1-1.fc25.x86_64 gdk-pixbuf2-2.35.4-1.fc25.x86_64 gdk-pixbuf2-modules-2.35.4-1.fc25.x86_64 gnome-session-wayland-session-3.21.90-1.fc25.x86_64 gnome-shell-3.21.91-1.fc25.x86_64 gtk3-3.21.5-1.fc25.x86_64 libwayland-client-1.11.92-1.fc25.x86_64 libwayland-cursor-1.11.92-1.fc25.x86_64 libwayland-server-1.11.92-1.fc25.x86_64 mesa-libwayland-egl-12.0.2-1.fc25.x86_64 mutter-3.21.91-2.fc25.x86_64 xorg-x11-server-Xwayland-1.18.4-5.fc25.x86_64 Fedora 25
Created attachment 335177 [details] drop-down lists broken
Created attachment 335178 [details] drop-down lists ok (with GDK_BACKEND=x11 GTK_CSD=1)
FWIW, seems to be an issue with calculating final/flipped_rect due to the transient-of GdkWindow not being the "real" window, so need to do the same GdkWindow traversing as in create_dynamic_positioner(). I'm in the process of doing this.
Created attachment 335351 [details] [review] wayland: Move move_to_rect related code closer together Move the code used for calculating the result of move_to_rect (final_rect, flipped_rect etc) closer to the other move_to_rect functions (i.e. next to create_dynamic_positioner), and let the xdg_popup configure handler just call the calculation function.
Created attachment 335352 [details] [review] wayland: Don't pass non-changing state when calculating popup rects
Created attachment 335353 [details] [review] wayland: Fix south-west anchor rect calculation
Created attachment 335354 [details] [review] wayland: Don't pass transient-for when getting real parent It's always derived from transient-for so no need to pass it.
Created attachment 335355 [details] [review] wayland: Don't pass parent when creating dynamic positioner When using the dynamic positioner (i.e. positioning from move_to_rect) we can always rely on having a proper transient-for to position relative to, so lets drop the ignored parameter.
Created attachment 335356 [details] [review] wayland: Use helper to translate to real parent window geometry Use a helper to translate a coordinate from non-real GdkWindow parent to window geometry coordinate space of the real GdkWindow parent, meaning the coordinate space of the GdkWindow of the parent used as a xdg_popup parent where (0, 0) is inside of the shadow margin.
Created attachment 335357 [details] [review] wayland: Transform moved_to_rect result properly The result of move_to_rect, received from the xdg_popup.configure event, needs to be translated to the correct coordinate space; that is from real parent window geometry to coordinates relative to the gdk window set as transient-for.
Created attachment 335358 [details] [review] wayland: Move and resize popup after it was configured A popup may have moved and resized when configured. Make sure every layer knows about this and call gdk_window_move_resize() with the configured dimension and position. This won't actually move the window, but might resize it.
Review of attachment 335352 [details] [review]: ::: gdk/wayland/gdkwindow-wayland.c @@ +1647,1 @@ I don't think we use this style of instantiation in the gtk+ codebase anywhere. Not sure if you'll get into trouble with msvc with it. Perhaps best to avoid it for now.
Review of attachment 335352 [details] [review]: ::: gdk/wayland/gdkwindow-wayland.c @@ +1647,1 @@ This is gdk/wayland which won't go through msvc, and in gdk/wayland we already use it here and there.
Review of attachment 335351 [details] [review]: looks fine to me
Review of attachment 335353 [details] [review]: ok
Review of attachment 335354 [details] [review]: ok
Review of attachment 335355 [details] [review]: ok
Review of attachment 335356 [details] [review]: ok
Review of attachment 335357 [details] [review]: ::: gdk/wayland/gdkwindow-wayland.c @@ +1847,1 @@ Same comment as few patches up - probably best to avoid introducing this syntax as part of this patch series. @@ -1839,3 @@ - .height = geometry.height - }; - Oh, it was already used! I retract my comments.
Review of attachment 335358 [details] [review]: ok
Review of attachment 335351 [details] [review]: .
Review of attachment 335352 [details] [review]: noticed further down that we already use compound literals in the wayland backend, so nevermind.
*** Bug 771242 has been marked as a duplicate of this bug. ***
Attachment 335351 [details] pushed as e656a14 - wayland: Move move_to_rect related code closer together Attachment 335352 [details] pushed as 4d2c0a8 - wayland: Don't pass non-changing state when calculating popup rects Attachment 335353 [details] pushed as 50e3330 - wayland: Fix south-west anchor rect calculation Attachment 335354 [details] pushed as 9a2ce3a - wayland: Don't pass transient-for when getting real parent Attachment 335355 [details] pushed as bc6630b - wayland: Don't pass parent when creating dynamic positioner Attachment 335356 [details] pushed as 74d237d - wayland: Use helper to translate to real parent window geometry Attachment 335357 [details] pushed as d792400 - wayland: Transform moved_to_rect result properly Attachment 335358 [details] pushed as c529d0a - wayland: Move and resize popup after it was configured