diff --git a/MozillaFirefox.changes b/MozillaFirefox.changes index 0aafef34..c48b624c 100644 --- a/MozillaFirefox.changes +++ b/MozillaFirefox.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Nov 15 11:21:16 UTC 2017 - christophe@krop.fr + +- Add show-context-menu-on-mouse-release.patch. + Starting with Firefox 57, the context menu appears on key press. + This patch creates a config entry to restore the + old behaviour. Without the patch, the mouse gesture extensions + require 2 clicks to work (bmo#1360278). The config entry is named + "input.contextMenu.onRelease" (default: false). + ------------------------------------------------------------------- Wed Nov 15 06:46:06 UTC 2017 - wr@rosenauer.org diff --git a/MozillaFirefox.spec b/MozillaFirefox.spec index 2aae3e1e..0fcd1f6e 100644 --- a/MozillaFirefox.spec +++ b/MozillaFirefox.spec @@ -157,6 +157,7 @@ Patch8: mozilla-bindgen-systemlibs.patch Patch101: firefox-kde.patch Patch102: firefox-no-default-ualocale.patch Patch103: firefox-branded-icons.patch +Patch104: show-context-menu-on-mouse-release.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires(post): coreutils shared-mime-info desktop-file-utils @@ -268,6 +269,7 @@ cd $RPM_BUILD_DIR/mozilla %patch101 -p1 %patch102 -p1 %patch103 -p1 +%patch104 -p1 %build # no need to add build time to binaries diff --git a/show-context-menu-on-mouse-release.patch b/show-context-menu-on-mouse-release.patch new file mode 100644 index 00000000..c9515b4f --- /dev/null +++ b/show-context-menu-on-mouse-release.patch @@ -0,0 +1,61 @@ +# HG changeset patch +# User Dimi Meim +# Date 1508186130 -10800 +# Mon Oct 16 23:35:30 2017 +0300 +# Node ID 7251515cd508453edff10be2e1294261ef1dc4b5 +# Parent c241c2b44a75f4bad80e12c3a1a7cb5aaf37a3f7 +Bug-1360278-fix + +diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js +--- a/modules/libpref/init/all.js ++++ b/modules/libpref/init/all.js +@@ -5913,3 +5913,6 @@ pref("dom.noopener.newprocess.enabled", + + pref("layers.omtp.enabled", false); + pref("layers.omtp.force-sync", false); ++ ++//Pop up context menu on mouse button release ++pref("input.contextMenu.onRelease", false); +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -362,6 +362,7 @@ static bool gBlockActivateE + static bool gGlobalsInitialized = false; + static bool gRaiseWindows = true; + ++static bool menuContextOnClickRelease = false; + #if GTK_CHECK_VERSION(3,4,0) + static uint32_t gLastTouchID = 0; + #endif +@@ -2795,9 +2796,11 @@ nsWindow::OnButtonPressEvent(GdkEventBut + + DispatchInputEvent(&event); + ++ Preferences::AddBoolVarCache(&menuContextOnClickRelease, "input.contextMenu.onRelease", false); ++ + // right menu click on linux should also pop up a context menu + if (domButton == WidgetMouseEvent::eRightButton && +- MOZ_LIKELY(!mIsDestroyed)) { ++ MOZ_LIKELY(!mIsDestroyed) && !menuContextOnClickRelease) { + WidgetMouseEvent contextMenuEvent(true, eContextMenu, this, + WidgetMouseEvent::eReal); + InitButtonEvent(contextMenuEvent, aEvent); +@@ -2838,6 +2841,18 @@ nsWindow::OnButtonReleaseEvent(GdkEventB + + DispatchInputEvent(&event); + mLastMotionPressure = pressure; ++ ++ Preferences::AddBoolVarCache(&menuContextOnClickRelease, "input.contextMenu.onRelease", false); ++ ++ // right menu click on linux should also pop up a context menu ++ if (domButton == WidgetMouseEvent::eRightButton && ++ MOZ_LIKELY(!mIsDestroyed) && menuContextOnClickRelease) { ++ WidgetMouseEvent contextMenuEvent(true, eContextMenu, this, ++ WidgetMouseEvent::eReal); ++ InitButtonEvent(contextMenuEvent, aEvent); ++ contextMenuEvent.pressure = mLastMotionPressure; ++ DispatchInputEvent(&contextMenuEvent); ++ } + } + + void