Bug 105257 - Wayland: Popup menus are misplaced when two monitors are not combined exactly side by side
Summary: Wayland: Popup menus are misplaced when two monitors are not combined exactly...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.2.3.3 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Wayland Multimonitor
  Show dependency treegraph
 
Reported: 2017-01-11 15:10 UTC by Noam Cohen
Modified: 2018-06-20 13:36 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
My displays arrangement (102.52 KB, image/png)
2017-01-11 15:10 UTC, Noam Cohen
Details
Popup menu opened in wrong place (129.56 KB, image/png)
2017-01-11 15:11 UTC, Noam Cohen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Noam Cohen 2017-01-11 15:10:22 UTC
Created attachment 130315 [details]
My displays arrangement

I'm using Fedora 25 with Wayland. My machine is connected to two displays. 

If the displays are not combined exactly side by side ("All Settings" -> "Displays" -> "Arrange Combined Displays" - see attachment), all popup menus opened using mouse right-clicks are misplaced (see attached example). If I'm combining the displays exactly side-by-side - the popup menus are opened where expected.
Comment 1 Noam Cohen 2017-01-11 15:11:23 UTC
Created attachment 130316 [details]
Popup menu opened in wrong place
Comment 2 Julien Nabet 2017-01-11 15:35:25 UTC
Wayland support is in progress in LO.
For the test, could you give a try to daily master LO? (see http://dev-builds.libreoffice.org/daily/master/)
Comment 3 Noam Cohen 2017-01-12 07:54:35 UTC
I downloaded and installed the LibreOfficeDev_5.4.0.0.alpha0_Linux_x86-64_rpm build. However -it starts up with an X backend instead of Wayland. Is there a RPM build that was compiled with the Wayland backend for me to test?
Comment 4 Julien Nabet 2017-01-12 08:04:21 UTC
Caolán: thought you might be interested in this one since I noticed commits from you concerning Wayland.
Comment 5 Caolán McNamara 2017-01-12 14:17:38 UTC
And non-libreoffice gtk3 using apps, e.g. gedit are perfectly fine right ?
Comment 6 Noam Cohen 2017-01-12 18:33:22 UTC
That is actually a very good question Caolan - 
In Fedora 24 (Gnome 3.20) - all GTK3 applications suffered from this behavior under Wayland. See the following external bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1375560

However - since Fedora 25 (Gnome 3.22) - the problem was solved for all GTK3 apps, except for Libreoffice.
Comment 7 Volker Sobek 2017-03-30 01:02:17 UTC
I didn't search the code but it looks like the it could be caused by using gtk_menu_popup(), which has been deprecated in 3.22 in favour of gtk_menu_popup_at_pointer() [0]. Other GTK3 applications updated their code accordingly. See link [1] for further information.

[0] https://developer.gnome.org/gtk3/stable/GtkMenu.html#gtk-menu-popup
[1] https://bugzilla.gnome.org/show_bug.cgi?id=772096
Comment 8 Caolán McNamara 2017-03-30 07:51:36 UTC
Well, try and make the modifications you think I should make and see if it works
Comment 9 Julien Nabet 2017-03-30 07:56:11 UTC
gtk_menu_popup() is used only twice according to Opengrok (see http://opengrok.libreoffice.org/search?q=gtk_menu_popup&project=core&defs=&refs=&path=&hist=)
1) sfx2/source/appl/shutdowniconunx.cxx
2) vcl/unx/gtk/gtksalmenu.cxx (which corresponds to gtk2 part)
Comment 10 QA Administrators 2017-09-29 08:57:52 UTC Comment hidden (obsolete)
Comment 11 Xisco Faulí 2018-01-25 09:50:50 UTC
Could you please try to reproduce it with a master build from http://dev-builds.libreoffice.org/daily/master/ ?
You can install it alongside the standard version.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the master build
Comment 12 Dima Ryazanov 2018-06-19 21:35:06 UTC
This is actually a Gtk+ bug. I have a fix for it here: https://gitlab.gnome.org/GNOME/gtk/issues/1154
Comment 13 Maxim Monastirsky 2018-06-19 21:49:55 UTC
(In reply to Dima Ryazanov from comment #12)
And in the meantime I converted master to use gtk_menu_popup_at_rect, so likely we're not affected by this anymore:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=c3e552ac25be001a623469c549ee8d0719b98133
Comment 14 Xisco Faulí 2018-06-20 13:36:34 UTC
(In reply to Maxim Monastirsky from comment #13)
> (In reply to Dima Ryazanov from comment #12)
> And in the meantime I converted master to use gtk_menu_popup_at_rect, so
> likely we're not affected by this anymore:
> 
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=c3e552ac25be001a623469c549ee8d0719b98133

Putting to RESOLVED FIXED then