summaryrefslogtreecommitdiff
path: root/mozilla-1705048.patch
diff options
context:
space:
mode:
authorMartin Stransky <stransky@redhat.com>2021-05-04 15:49:34 +0200
committerMartin Stransky <stransky@redhat.com>2021-05-04 15:49:34 +0200
commitc21308043168cbc1b97981c87205afd7f6bab4c6 (patch)
tree626c00071fd2c85cdcbcac24f3600ec196f35ab1 /mozilla-1705048.patch
parentAdded pciutils-libs req (rhbz#1955338), Enabled Wayland on KDE (rhbz#1922608) (diff)
downloadlibrewolf-fedora-ff-c21308043168cbc1b97981c87205afd7f6bab4c6.tar.gz
librewolf-fedora-ff-c21308043168cbc1b97981c87205afd7f6bab4c6.tar.bz2
librewolf-fedora-ff-c21308043168cbc1b97981c87205afd7f6bab4c6.zip
Added fix for WebRTC indicator - mozilla#1705048
Diffstat (limited to 'mozilla-1705048.patch')
-rw-r--r--mozilla-1705048.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/mozilla-1705048.patch b/mozilla-1705048.patch
new file mode 100644
index 0000000..58497a4
--- /dev/null
+++ b/mozilla-1705048.patch
@@ -0,0 +1,70 @@
+diff -up firefox-88.0/widget/gtk/nsWindow.cpp.1705048 firefox-88.0/widget/gtk/nsWindow.cpp
+--- firefox-88.0/widget/gtk/nsWindow.cpp.1705048 2021-05-04 15:43:16.039586526 +0200
++++ firefox-88.0/widget/gtk/nsWindow.cpp 2021-05-04 15:47:26.358614462 +0200
+@@ -553,6 +553,7 @@ nsWindow::nsWindow() {
+ mTitlebarBackdropState = false;
+
+ mHasAlphaVisual = false;
++ mIsWaylandPanelWindow = false;
+ mIsPIPWindow = false;
+ mAlwaysOnTop = false;
+
+@@ -3713,7 +3714,7 @@ void nsWindow::OnButtonPressEvent(GdkEve
+
+ LayoutDeviceIntPoint refPoint =
+ GdkEventCoordsToDevicePixels(aEvent->x, aEvent->y);
+- if (mDraggableRegion.Contains(refPoint.x, refPoint.y) &&
++ if ((mIsWaylandPanelWindow || mDraggableRegion.Contains(refPoint.x, refPoint.y)) &&
+ domButton == MouseButton::ePrimary &&
+ eventStatus != nsEventStatus_eConsumeNoDefault) {
+ mWindowShouldStartDragging = true;
+@@ -4614,8 +4615,9 @@ nsresult nsWindow::Create(nsIWidget* aPa
+ // as a workaround.
+ mWindowType = eWindowType_toplevel;
+ } else if (mWindowType == eWindowType_popup && !aNativeParent && !aParent) {
+- // Workaround for Wayland where the popup windows always need to have
+- // parent window. For example webrtc ui is a popup window without parent.
++ // mIsWaylandPanelWindow is a special toplevel window on Wayland which
++ // emulates X11 popup window without parent.
++ mIsWaylandPanelWindow = true;
+ mWindowType = eWindowType_toplevel;
+ }
+ }
+@@ -4642,8 +4644,10 @@ nsresult nsWindow::Create(nsIWidget* aPa
+ // popup window position.
+ GtkWindowType type = GTK_WINDOW_TOPLEVEL;
+ if (mWindowType == eWindowType_popup) {
+- type = (mIsX11Display && aInitData->mNoAutoHide) ? GTK_WINDOW_TOPLEVEL
+- : GTK_WINDOW_POPUP;
++ type = GTK_WINDOW_POPUP;
++ if (GdkIsX11Display() && aInitData->mNoAutoHide) {
++ type = GTK_WINDOW_TOPLEVEL;
++ }
+ }
+ mShell = gtk_window_new(type);
+
+@@ -4890,6 +4894,10 @@ nsresult nsWindow::Create(nsIWidget* aPa
+ }
+ #endif
+
++ if (mIsWaylandPanelWindow) {
++ gtk_window_set_decorated(GTK_WINDOW(mShell), false);
++ }
++
+ if (mWindowType == eWindowType_popup) {
+ // gdk does not automatically set the cursor for "temporary"
+ // windows, which are what gtk uses for popups.
+diff -up firefox-88.0/widget/gtk/nsWindow.h.1705048 firefox-88.0/widget/gtk/nsWindow.h
+--- firefox-88.0/widget/gtk/nsWindow.h.1705048 2021-05-04 15:43:16.041586502 +0200
++++ firefox-88.0/widget/gtk/nsWindow.h 2021-05-04 15:45:01.703331956 +0200
+@@ -591,6 +591,10 @@ class nsWindow final : public nsBaseWidg
+ LayoutDeviceIntRegion mDraggableRegion;
+ // It's PictureInPicture window.
+ bool mIsPIPWindow;
++ // It's undecorated popup utility window, without resizers/titlebar,
++ // movable by mouse. Used on Wayland as a workaround for popups without
++ // parent (for instance WebRTC sharing indicator).
++ bool mIsWaylandPanelWindow;
+ bool mAlwaysOnTop;
+
+ #ifdef ACCESSIBILITY
bgstack15