GNOME Bugzilla – Bug 776055
window menu misplaced with HiDPI
Last modified: 2017-01-03 07:29:34 UTC
Created attachment 341907 [details] Issue On HiDPI screens, the window's menu is misplaced (not under the mouse position). It appears to be roughly the right position divided by 2, which would make sense. We probably missing scale factor somewhere in either gnome-shell or mutter.
This is actually a Gtk+ issue.
Note that to reproduce you have to press the Ctrl key and right click on the titlebar of an application.
Created attachment 342135 [details] gtk window menu bug (image) This happens in non HiDPI screens too. How to reproduce: 1. open some application (say, gedit) -> Right click on some titlebar item that can be clicked (eg: menu button, close button, etc).
The bug is in mutter, so moving it there.
Just for the record, I infered this was a Gtk+ issue because this menu seems to be triggered by the app, because it's a reaction to a click on the titlebar (I might be wrong). Even though the menu is drawn by mutter, the event and requests to draw the menu are set by Gtk+.
(In reply to Lionel Landwerlin from comment #5) > Just for the record, I infered this was a Gtk+ issue because this menu seems > to be triggered by the app, because it's a reaction to a click on the > titlebar (I might be wrong). Even though the menu is drawn by mutter, the > event and requests to draw the menu are set by Gtk+. You are correct! GTK+ does open the menu, but it is mutter/gnome-shell who draws it. I took quick look and determined that GTK+ did it correctly, and mutter did not, which is why I moved it. Thanks for the report either way!
Created attachment 342624 [details] [review] wayland/xdg-shell: Scale window menu coordinates When the monitor the surface is on has a scale other than 1, the coordinate of the window menu popup position needs to be scaled, as it is reported in logical pixels, while the stage is still in physical pixels.
Review of attachment 342624 [details] [review]: indeed
Attachment 342624 [details] pushed as 81b1192 - wayland/xdg-shell: Scale window menu coordinates