RESOLVED FIXED 210069
[GTK] Use gdk_window_move_to_rect() to position popup menus
https://bugs.webkit.org/show_bug.cgi?id=210069
Summary [GTK] Use gdk_window_move_to_rect() to position popup menus
Michael Catanzaro
Reported 2020-04-06 13:26:34 PDT
Bug title: [GTK] Use gdk_window_move_to_rect() to position popup menus WebPopupMenuProxyGtk::showPopupMenu currently uses gtk_window_move() to position the popup menu. Jonas doesn't like this; he says it can cause the menu to be positioned offscreen. Indeed, we have a longstanding bug where context menus near the bottom of the window will exceed the length of the screen. Jonas says Firefox doesn't have this problem, and that the fix would be to use gdk_window_move_to_rect() instead. Our code already has a FIXME to do this, with a pointer to a bug report asking for that API (which was private at the time) to be exported: // FIXME: We can't ensure the menu will be on screen in Wayland. // https://blog.gtk.org/2016/07/15/future-of-relative-window-positioning/ // https://gitlab.gnome.org/GNOME/gtk/issues/997 I looked into trying this, but it didn't look simple.
Attachments
Patch (3.77 KB, patch)
2020-04-11 05:58 PDT, Carlos Garcia Campos
mcatanzaro: review+
Regression: dropdown select menus mispositioned (128.00 KB, image/png)
2020-04-16 04:17 PDT, Jim Mason
no flags
Carlos Garcia Campos
Comment 1 2020-04-11 05:58:00 PDT
Carlos Garcia Campos
Comment 2 2020-04-12 02:28:52 PDT
Jim Mason
Comment 3 2020-04-16 04:17:07 PDT
Created attachment 396632 [details] Regression: dropdown select menus mispositioned With this patch, I am finding that dropdown SELECT menus are mispositioned. See attachment. GTK 3.24.11 / X11 (If I should be opening new slips for regressions, please let me know.)
Note You need to log in before you can comment on or make changes to this bug.