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 780498 - Use gtk_menu_popup_at_widget and set 'transient-for' in the Photo Dialog
Use gtk_menu_popup_at_widget and set 'transient-for' in the Photo Dialog
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: User Accounts
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-24 11:56 UTC by Felipe Borges
Modified: 2017-05-03 11:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
user-accounts: Use gtk_menu_popup_at_widget for user photo popup (1.72 KB, patch)
2017-03-24 11:56 UTC, Felipe Borges
committed Details | Review
user-accounts: Explicitly set photo_popup transient_for window (1.57 KB, patch)
2017-03-24 11:56 UTC, Felipe Borges
committed Details | Review

Description Felipe Borges 2017-03-24 11:56:17 UTC
The popup menu could be presented in a wrong position in touchscreens under wayland.

See https://bugzilla.gnome.org/show_bug.cgi?id=771802
Comment 1 Felipe Borges 2017-03-24 11:56:45 UTC
Created attachment 348642 [details] [review]
user-accounts: Use gtk_menu_popup_at_widget for user photo popup

gtk_menu_popup has been deprecated since version 3.22.

The use of gtk_menu_popup lately was causing gtk+ to have to guess
the right position to present the widget, causing the menu to
eventually appear in a wrong position under Wayland.
Comment 2 Felipe Borges 2017-03-24 11:56:51 UTC
Created attachment 348643 [details] [review]
user-accounts: Explicitly set photo_popup transient_for window

Instead of relying in the underlying machinery for guessing the
correct window.
Comment 3 Ondrej Holy 2017-05-03 10:57:22 UTC
Review of attachment 348642 [details] [review]:

Looks ok and fixes the following:

Gdk-Message: Window 0x55918c71b000 is a temporary window without parent, application will not be able to position it on screen.
Gdk-Message: Window 0x55918c71b000 is a temporary window without parent, application will not be able to position it on screen.

(gnome-control-center:23117): Gdk-CRITICAL **: xdg_popup_configure: assertion 'impl->transient_for' failed
Comment 4 Ondrej Holy 2017-05-03 10:57:24 UTC
Review of attachment 348643 [details] [review]:

Why is this needed?
Comment 5 Felipe Borges 2017-05-03 11:16:01 UTC
(In reply to Ondrej Holy from comment #4)
> Review of attachment 348643 [details] [review] [review]:
> 
> Why is this needed?

Because the logic to automatically pick up the right window might change, so we arbitrarily enforce it to avoid unexpected behavior.

There was more discussions to it on IRC and on Bug 771802.
Comment 6 Felipe Borges 2017-05-03 11:17:00 UTC
Comment on attachment 348642 [details] [review]
user-accounts: Use gtk_menu_popup_at_widget for user photo popup

This one is ready to go already.

Attachment 348642 [details] pushed as 9536dcd - user-accounts: Use gtk_menu_popup_at_widget for user photo popup
Comment 7 Ondrej Holy 2017-05-03 11:23:13 UTC
Review of attachment 348643 [details] [review]:

Should be ok then...
Comment 8 Felipe Borges 2017-05-03 11:59:27 UTC
Thanks!

Attachment 348643 [details] pushed as 9368992 - user-accounts: Explicitly set photo_popup transient_for window