After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771117 - gtk3 3.21.5 broke displaying drop-down lists, need to scroll to see contents
gtk3 3.21.5 broke displaying drop-down lists, need to scroll to see contents
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.21.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: WaylandRelated
 
 
Reported: 2016-09-09 12:09 UTC by Kamil Páral
Modified: 2016-09-14 03:53 UTC
See Also:
GNOME target: 3.22
GNOME version: ---


Attachments
drop-down lists broken (243.99 KB, video/webm)
2016-09-09 12:16 UTC, Kamil Páral
  Details
drop-down lists ok (with GDK_BACKEND=x11 GTK_CSD=1) (109.90 KB, video/webm)
2016-09-09 12:16 UTC, Kamil Páral
  Details
wayland: Move move_to_rect related code closer together (11.76 KB, patch)
2016-09-12 11:15 UTC, Jonas Ådahl
committed Details | Review
wayland: Don't pass non-changing state when calculating popup rects (3.45 KB, patch)
2016-09-12 11:16 UTC, Jonas Ådahl
committed Details | Review
wayland: Fix south-west anchor rect calculation (902 bytes, patch)
2016-09-12 11:16 UTC, Jonas Ådahl
committed Details | Review
wayland: Don't pass transient-for when getting real parent (1.72 KB, patch)
2016-09-12 11:16 UTC, Jonas Ådahl
committed Details | Review
wayland: Don't pass parent when creating dynamic positioner (1.70 KB, patch)
2016-09-12 11:16 UTC, Jonas Ådahl
committed Details | Review
wayland: Use helper to translate to real parent window geometry (2.86 KB, patch)
2016-09-12 11:16 UTC, Jonas Ådahl
committed Details | Review
wayland: Transform moved_to_rect result properly (2.35 KB, patch)
2016-09-12 11:16 UTC, Jonas Ådahl
committed Details | Review
wayland: Move and resize popup after it was configured (2.43 KB, patch)
2016-09-12 11:16 UTC, Jonas Ådahl
committed Details | Review

Description Kamil Páral 2016-09-09 12:09:53 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
Comment 1 Kamil Páral 2016-09-09 12:16:13 UTC
Created attachment 335177 [details]
drop-down lists broken
Comment 2 Kamil Páral 2016-09-09 12:16:36 UTC
Created attachment 335178 [details]
drop-down lists ok (with GDK_BACKEND=x11 GTK_CSD=1)
Comment 3 Jonas Ådahl 2016-09-10 04:01:47 UTC
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.
Comment 4 Jonas Ådahl 2016-09-12 11:15:59 UTC
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.
Comment 5 Jonas Ådahl 2016-09-12 11:16:05 UTC
Created attachment 335352 [details] [review]
wayland: Don't pass non-changing state when calculating popup rects
Comment 6 Jonas Ådahl 2016-09-12 11:16:10 UTC
Created attachment 335353 [details] [review]
wayland: Fix south-west anchor rect calculation
Comment 7 Jonas Ådahl 2016-09-12 11:16:16 UTC
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.
Comment 8 Jonas Ådahl 2016-09-12 11:16:25 UTC
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.
Comment 9 Jonas Ådahl 2016-09-12 11:16:32 UTC
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.
Comment 10 Jonas Ådahl 2016-09-12 11:16:42 UTC
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.
Comment 11 Jonas Ådahl 2016-09-12 11:16:48 UTC
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.
Comment 12 Matthias Clasen 2016-09-12 15:25:55 UTC
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.
Comment 13 Jonas Ådahl 2016-09-12 15:29:17 UTC
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.
Comment 14 Matthias Clasen 2016-09-12 15:29:50 UTC
Review of attachment 335351 [details] [review]:

looks fine to me
Comment 15 Matthias Clasen 2016-09-12 15:30:32 UTC
Review of attachment 335353 [details] [review]:

ok
Comment 16 Matthias Clasen 2016-09-12 15:31:10 UTC
Review of attachment 335354 [details] [review]:

ok
Comment 17 Matthias Clasen 2016-09-12 15:36:22 UTC
Review of attachment 335355 [details] [review]:

ok
Comment 18 Matthias Clasen 2016-09-12 15:37:48 UTC
Review of attachment 335356 [details] [review]:

ok
Comment 19 Matthias Clasen 2016-09-12 15:43:38 UTC
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.
Comment 20 Matthias Clasen 2016-09-12 15:45:06 UTC
Review of attachment 335358 [details] [review]:

ok
Comment 21 Matthias Clasen 2016-09-12 15:45:20 UTC
Review of attachment 335358 [details] [review]:

ok
Comment 22 Matthias Clasen 2016-09-12 15:45:38 UTC
Review of attachment 335351 [details] [review]:

.
Comment 23 Matthias Clasen 2016-09-12 15:46:16 UTC
Review of attachment 335352 [details] [review]:

noticed further down that we already use compound literals in the wayland backend, so nevermind.
Comment 24 Matthias Clasen 2016-09-12 15:53:09 UTC
*** Bug 771242 has been marked as a duplicate of this bug. ***
Comment 25 Jonas Ådahl 2016-09-14 03:52:58 UTC
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