[arch-commits] Commit in firefox/trunk (2 files)
Jan Steffens
heftig at archlinux.org
Wed Nov 22 12:49:19 UTC 2017
Date: Wednesday, November 22, 2017 @ 12:49:16
Author: heftig
Revision: 310579
Really fix sums (git broke the patch)
Modified:
firefox/trunk/0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch
firefox/trunk/PKGBUILD
-----------------------------------------------------------------+
0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch | 37 +++++-----
PKGBUILD | 2
2 files changed, 20 insertions(+), 19 deletions(-)
Modified: 0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch
===================================================================
--- 0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch 2017-11-22 12:48:02 UTC (rev 310578)
+++ 0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch 2017-11-22 12:49:16 UTC (rev 310579)
@@ -23,7 +23,7 @@
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -234,6 +234,10 @@ pref("browser.sessionhistory.max_total_viewers", -1);
-
+
pref("ui.use_native_colors", true);
pref("ui.click_hold_context_menus", false);
+
@@ -40,7 +40,7 @@
@@ -4700,30 +4700,49 @@ NSEvent* gLastDragMouseDownEvent = nil;
if (!mGeckoChild)
return;
-
+
- // Let the superclass do the context menu stuff.
- [super rightMouseDown:theEvent];
+ if (!nsBaseWidget::ShowContextMenuAfterMouseUp()) {
@@ -47,26 +47,26 @@
+ // Let the superclass do the context menu stuff.
+ [super rightMouseDown:theEvent];
+ }
-
+
NS_OBJC_END_TRY_ABORT_BLOCK;
}
-
+
- (void)rightMouseUp:(NSEvent *)theEvent
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
-
+
if (!mGeckoChild)
return;
if (mTextInputHandler->OnHandleEvent(theEvent)) {
return;
}
-
+
WidgetMouseEvent geckoEvent(true, eMouseUp, mGeckoChild,
WidgetMouseEvent::eReal);
[self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
geckoEvent.button = WidgetMouseEvent::eRightButton;
geckoEvent.mClickCount = [theEvent clickCount];
-
+
nsAutoRetainCocoaObject kungFuDeathGrip(self);
mGeckoChild->DispatchInputEvent(&geckoEvent);
+ if (!mGeckoChild)
@@ -86,7 +86,7 @@
+
+ [super rightMouseDown:dupeEvent];
+ }
-
+
NS_OBJC_END_TRY_ABORT_BLOCK;
}
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
@@ -96,7 +96,7 @@
@@ -2737,6 +2737,19 @@ static guint ButtonMaskFromGDKButton(guint button)
return GDK_BUTTON1_MASK << (button - 1);
}
-
+
+void
+nsWindow::DispatchContextMenuEventFromMouseEvent(uint16_t domButton,
+ GdkEventButton *aEvent)
@@ -115,7 +115,7 @@
{
@@ -2806,13 +2819,8 @@ nsWindow::OnButtonPressEvent(GdkEventButton *aEvent)
DispatchInputEvent(&event);
-
+
// right menu click on linux should also pop up a context menu
- if (domButton == WidgetMouseEvent::eRightButton &&
- MOZ_LIKELY(!mIsDestroyed)) {
@@ -128,9 +128,9 @@
+ DispatchContextMenuEventFromMouseEvent(domButton, aEvent);
}
}
-
+
@@ -2848,6 +2856,11 @@ nsWindow::OnButtonReleaseEvent(GdkEventButton *aEvent)
-
+
DispatchInputEvent(&event);
mLastMotionPressure = pressure;
+
@@ -139,7 +139,7 @@
+ DispatchContextMenuEventFromMouseEvent(domButton, aEvent);
+ }
}
-
+
void
diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
index 0fafc8994579fe3c..7a28e3260c0fdefb 100644
@@ -146,9 +146,9 @@
--- a/widget/gtk/nsWindow.h
+++ b/widget/gtk/nsWindow.h
@@ -245,6 +245,8 @@ private:
-
+
void UpdateClientOffset();
-
+
+ void DispatchContextMenuEventFromMouseEvent(uint16_t domButton,
+ GdkEventButton *aEvent);
public:
@@ -161,7 +161,7 @@
@@ -1218,6 +1218,22 @@ nsBaseWidget::DispatchEventToAPZOnly(mozilla::WidgetInputEvent* aEvent)
}
}
-
+
+// static
+bool
+nsBaseWidget::ShowContextMenuAfterMouseUp()
@@ -188,7 +188,7 @@
@@ -417,6 +417,12 @@ public:
void RecvScreenPixels(mozilla::ipc::Shmem&& aMem, const ScreenIntSize& aSize) override {};
#endif
-
+
+ /**
+ * Whether context menus should only appear on mouseup instead of mousedown,
+ * on OSes where they normally appear on mousedown (macOS, *nix).
@@ -198,5 +198,6 @@
protected:
// These are methods for CompositorWidgetWrapper, and should only be
// accessed from that class. Derived widgets can choose which methods to
---
+--
2.15.0
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-11-22 12:48:02 UTC (rev 310578)
+++ PKGBUILD 2017-11-22 12:49:16 UTC (rev 310579)
@@ -28,7 +28,7 @@
sha256sums=('SKIP'
'677e1bde4c6b3cff114345c211805c7c43085038ca0505718a11e96432e9811a'
'a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9'
- '6d457c1e623d2ca3ed11d169f23275545b4b60dc296e005700139b3f25f6f56d'
+ '1f71b379f2262d7319624c2aed31fa2dbed42828feccc27b1cd82153b76ad707'
'f068b84ad31556095145d8fefc012dd3d1458948533ed3fff6cbc7250b6e73ed'
'e98a3453d803cc7ddcb81a7dc83f883230dd8591bdf936fc5a868428979ed1f1'
'd86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd'
More information about the arch-commits
mailing list