summaryrefslogtreecommitdiff
path: root/mozilla-1532643-popup.patch
diff options
context:
space:
mode:
authorMartin Stransky <stransky@redhat.com>2019-03-12 12:32:07 +0100
committerMartin Stransky <stransky@redhat.com>2019-03-12 12:32:07 +0100
commit83e8010a4fd29f2c59a56f8add09412ba27ebb09 (patch)
tree0878a3c0e59becfc92a1d86ddb3664447c5343cc /mozilla-1532643-popup.patch
parentDisabled s390x builds due to https://pagure.io/fedora-infrastructure/issue/7581 (diff)
downloadlibrewolf-fedora-ff-83e8010a4fd29f2c59a56f8add09412ba27ebb09.tar.gz
librewolf-fedora-ff-83e8010a4fd29f2c59a56f8add09412ba27ebb09.tar.bz2
librewolf-fedora-ff-83e8010a4fd29f2c59a56f8add09412ba27ebb09.zip
Updated to 66.0
Diffstat (limited to 'mozilla-1532643-popup.patch')
-rw-r--r--mozilla-1532643-popup.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/mozilla-1532643-popup.patch b/mozilla-1532643-popup.patch
new file mode 100644
index 0000000..b809139
--- /dev/null
+++ b/mozilla-1532643-popup.patch
@@ -0,0 +1,71 @@
+diff -up firefox-66.0/layout/xul/moz.build.mozilla-1532643-popup firefox-66.0/layout/xul/moz.build
+--- firefox-66.0/layout/xul/moz.build.mozilla-1532643-popup 2019-03-12 01:22:20.000000000 +0100
++++ firefox-66.0/layout/xul/moz.build 2019-03-12 12:21:43.036982252 +0100
+@@ -88,3 +88,6 @@ LOCAL_INCLUDES += [
+
+ if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+ CXXFLAGS += ['-Wno-error=shadow']
++
++CFLAGS += CONFIG['TK_CFLAGS']
++CXXFLAGS += CONFIG['TK_CFLAGS']
+diff -up firefox-66.0/layout/xul/nsMenuPopupFrame.cpp.mozilla-1532643-popup firefox-66.0/layout/xul/nsMenuPopupFrame.cpp
+--- firefox-66.0/layout/xul/nsMenuPopupFrame.cpp.mozilla-1532643-popup 2019-03-12 01:22:20.000000000 +0100
++++ firefox-66.0/layout/xul/nsMenuPopupFrame.cpp 2019-03-12 12:23:11.860770255 +0100
+@@ -55,6 +55,10 @@
+ #include "mozilla/dom/KeyboardEvent.h"
+ #include "mozilla/dom/KeyboardEventBinding.h"
+ #include <algorithm>
++#ifdef MOZ_WAYLAND
++#include <gdk/gdk.h>
++#include <gdk/gdkx.h>
++#endif /* MOZ_WAYLAND */
+
+ using namespace mozilla;
+ using mozilla::dom::Event;
+@@ -298,11 +302,29 @@ nsresult nsMenuPopupFrame::CreateWidgetF
+ !(mode == eTransparencyTransparent || tag == nsGkAtoms::menulist);
+ widgetData.mPopupLevel = PopupLevel(widgetData.mNoAutoHide);
+
++ static bool waylandBackend =
++#ifdef MOZ_WAYLAND
++ !GDK_IS_X11_DISPLAY(gdk_display_get_default());
++#else
++ false;
++#endif
++
+ // panels which have a parent level need a parent widget. This allows them to
+ // always appear in front of the parent window but behind other windows that
+ // should be in front of it.
+ nsCOMPtr<nsIWidget> parentWidget;
+- if (widgetData.mPopupLevel != ePopupLevelTop) {
++ if (waylandBackend) {
++ // On Wayland we always need to connect menu to its parent menu widget
++ // otherwise it's not shown.
++ nsMenuFrame* menuFrame = do_QueryFrame(GetParent());
++ if (menuFrame) {
++ nsMenuParent* parentPopup = menuFrame->GetMenuParent();
++ if (parentPopup && parentPopup->IsMenu()) {
++ parentWidget =
++ static_cast<nsMenuPopupFrame*>(parentPopup)->GetWidget();
++ }
++ }
++ } else if (widgetData.mPopupLevel != ePopupLevelTop) {
+ nsCOMPtr<nsIDocShellTreeItem> dsti = PresContext()->GetDocShell();
+ if (!dsti) return NS_ERROR_FAILURE;
+
+diff -up firefox-66.0/widget/gtk/nsWindow.cpp.mozilla-1532643-popup firefox-66.0/widget/gtk/nsWindow.cpp
+--- firefox-66.0/widget/gtk/nsWindow.cpp.mozilla-1532643-popup 2019-03-12 12:21:43.034982257 +0100
++++ firefox-66.0/widget/gtk/nsWindow.cpp 2019-03-12 12:21:43.037982249 +0100
+@@ -3485,11 +3485,7 @@ nsresult nsWindow::Create(nsIWidget *aPa
+ } else {
+ switch (aInitData->mPopupHint) {
+ case ePopupTypeMenu:
+- // Use GDK_WINDOW_TYPE_HINT_UTILITY on Wayland which
+- // guides Gtk to create the popup as subsurface
+- // instead of xdg_shell popup (see Bug 1423598).
+- gtkTypeHint = mIsX11Display ? GDK_WINDOW_TYPE_HINT_POPUP_MENU
+- : GDK_WINDOW_TYPE_HINT_UTILITY;
++ gtkTypeHint = GDK_WINDOW_TYPE_HINT_POPUP_MENU;
+ break;
+ case ePopupTypeTooltip:
+ gtkTypeHint = GDK_WINDOW_TYPE_HINT_TOOLTIP;
bgstack15