WebKit Bugzilla
Attachment 341451 Details for
Bug 170553
: [GTK] Misplaced right click menu on web page due to deprecated gtk_menu_popup()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-170553-20180528121715.patch (text/plain), 4.08 KB, created by
Adrian Perez
on 2018-05-28 04:17:16 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Adrian Perez
Created:
2018-05-28 04:17:16 PDT
Size:
4.08 KB
patch
obsolete
>Subversion Revision: 232242 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index f6f88965253ac7713a0778ae0f85cc5206e0bc60..eaa960f3278ac7a4e6b11d3929ec1639e30cecf1 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,19 @@ >+2018-05-28 Adrian Perez de Castro <aperez@igalia.com> >+ >+ [GTK] Misplaced right click menu on web page due to deprecated gtk_menu_popup() >+ https://bugs.webkit.org/show_bug.cgi?id=170553 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Use gtk_menu_popup_at_pointer() when building with GTK+ 3.22 or newer. >+ This allows the Wayland GTK+ backend to properly position the context >+ menu, and avoids using the deprecated gtk_menu_popup() function. >+ >+ * UIProcess/gtk/WebContextMenuProxyGtk.cpp: >+ (WebKit::WebContextMenuProxyGtk::showContextMenuWithItems): Use >+ gtk_menu_popup_at_pointer() as there is always a pointer event >+ available to pass to the function. >+ > 2018-05-28 Carlos Garcia Campos <cgarcia@igalia.com> > > Unreviewed. Update OptionsGTK.cmake and NEWS for 2.21.3 release. >diff --git a/Source/WebKit/UIProcess/gtk/WebContextMenuProxyGtk.cpp b/Source/WebKit/UIProcess/gtk/WebContextMenuProxyGtk.cpp >index d22029eb8be8ad1955daa9a117c667e5bf1d2f59..d593df34e644b44b749e12d283a181f7154092c8 100644 >--- a/Source/WebKit/UIProcess/gtk/WebContextMenuProxyGtk.cpp >+++ b/Source/WebKit/UIProcess/gtk/WebContextMenuProxyGtk.cpp >@@ -167,7 +167,12 @@ void WebContextMenuProxyGtk::showContextMenuWithItems(Vector<Ref<WebContextMenuI > NativeWebMouseEvent* mouseEvent = m_page->currentlyProcessedMouseDownEvent(); > const GdkEvent* event = mouseEvent ? mouseEvent->nativeEvent() : 0; > gtk_menu_attach_to_widget(m_menu, GTK_WIDGET(m_webView), nullptr); >+ >+#if GTK_CHECK_VERSION(3, 22, 0) >+ gtk_menu_popup_at_pointer(m_menu, event); >+#else > gtk_menu_popup(m_menu, nullptr, nullptr, reinterpret_cast<GtkMenuPositionFunc>(menuPositionFunction), this, event ? event->button.button : 3, event ? event->button.time : GDK_CURRENT_TIME); >+#endif > } > > WebContextMenuProxyGtk::WebContextMenuProxyGtk(GtkWidget* webView, WebPageProxy& page, ContextMenuContextData&& context, const UserData& userData) >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index ab7261f1a377c362039757370ea4d9f33b2d1423..63f724f35a2320aae35a37a56adb2bca83fed289 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,18 @@ >+2018-05-28 Adrian Perez de Castro <aperez@igalia.com> >+ >+ [GTK] Misplaced right click menu on web page due to deprecated gtk_menu_popup() >+ https://bugs.webkit.org/show_bug.cgi?id=170553 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Use gtk_menu_popup_at_pointer() when building with GTK+ 3.22 or newer. >+ This allows the Wayland GTK+ backend to properly position the context >+ menu, and avoids using the deprecated gtk_menu_popup() function. >+ >+ * MiniBrowser/gtk/BrowserSearchBar.c: >+ (searchEntryMenuIconPressedCallback): Use gtk_menu_popup_at_pointer() >+ as there is always a pointer event available to pass to the function. >+ > 2018-05-28 Thibault Saunier <tsaunier@igalia.com> > > [GStreamer] Handle changes in the "drm-preferred-decryption-system-id" NEED_CONTEXT message. >diff --git a/Tools/MiniBrowser/gtk/BrowserSearchBar.c b/Tools/MiniBrowser/gtk/BrowserSearchBar.c >index 22930c4c5efbc2529cdb0eb595531c7b885e8606..5c0cb0a445cc13bc609e3fa78f2f9421ec083a80 100644 >--- a/Tools/MiniBrowser/gtk/BrowserSearchBar.c >+++ b/Tools/MiniBrowser/gtk/BrowserSearchBar.c >@@ -93,8 +93,12 @@ static void searchCloseButtonClickedCallback(BrowserSearchBar *searchBar) > static void searchEntryMenuIconPressedCallback(BrowserSearchBar *searchBar, GtkEntryIconPosition iconPosition, GdkEvent *event) > { > if (iconPosition == GTK_ENTRY_ICON_PRIMARY) { >+#if GTK_CHECK_VERSION(3, 22, 0) >+ gtk_menu_popup_at_pointer(GTK_MENU(searchBar->optionsMenu), event); >+#else > GdkEventButton *eventButton = (GdkEventButton *)event; > gtk_menu_popup(GTK_MENU(searchBar->optionsMenu), NULL, NULL, NULL, NULL, eventButton->button, eventButton->time); >+#endif > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 170553
:
306416
|
306432
|
306444
|
306445
|
306500
|
306502
|
306505
|
306694
|
341451
|
396713
|
396714
|
397745
|
397748
|
397947
|
398061
|
398062
|
398064