Bug 1360278 - Add preference to trigger context menu on mouse up for GTK+ and macOS, r=mstange,smaug
MozReview-Commit-ID: Bg60bD8jIg6
This commit is contained in:
@@ -1218,6 +1218,22 @@ nsBaseWidget::DispatchEventToAPZOnly(mozilla::WidgetInputEvent* aEvent)
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
bool
|
||||
nsBaseWidget::ShowContextMenuAfterMouseUp()
|
||||
{
|
||||
static bool gContextMenuAfterMouseUp = false;
|
||||
static bool gContextMenuAfterMouseUpCached = false;
|
||||
if (!gContextMenuAfterMouseUpCached) {
|
||||
Preferences::AddBoolVarCache(&gContextMenuAfterMouseUp,
|
||||
"ui.context_menus.after_mouseup",
|
||||
false);
|
||||
|
||||
gContextMenuAfterMouseUpCached = true;
|
||||
}
|
||||
return gContextMenuAfterMouseUp;
|
||||
}
|
||||
|
||||
nsIDocument*
|
||||
nsBaseWidget::GetDocument() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user