Loading layout/xul/nsResizerFrame.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -33,6 +33,13 @@ using namespace mozilla; #ifdef MOZ_WAYLAND # include "mozilla/WidgetUtilsGtk.h" # define IS_WAYLAND_DISPLAY() mozilla::widget::GdkIsWaylandDisplay() #else # define IS_WAYLAND_DISPLAY() false #endif // // NS_NewResizerFrame // Loading Loading @@ -191,7 +198,9 @@ nsresult nsResizerFrame::HandleEvent(nsPresContext* aPresContext, // Don't allow resizing a window or a popup past the edge of the screen, // so adjust the rectangle to fit within the available screen area. if (window) { // Don't check it on Wayland as we can't get absolute window position // there. if (window && !IS_WAYLAND_DISPLAY()) { nsCOMPtr<nsIScreen> screen; nsCOMPtr<nsIScreenManager> sm( do_GetService("@mozilla.org/gfx/screenmanager;1")); Loading @@ -210,7 +219,7 @@ nsresult nsResizerFrame::HandleEvent(nsPresContext* aPresContext, rect.IntersectRect(rect, screenRect); } } } else if (menuPopupFrame) { } else if (menuPopupFrame && !IS_WAYLAND_DISPLAY()) { nsRect frameRect = menuPopupFrame->GetScreenRectInAppUnits(); nsIFrame* rootFrame = aPresContext->PresShell()->GetRootFrame(); nsRect rootScreenRect = rootFrame->GetScreenRectInAppUnits(); Loading Loading
layout/xul/nsResizerFrame.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -33,6 +33,13 @@ using namespace mozilla; #ifdef MOZ_WAYLAND # include "mozilla/WidgetUtilsGtk.h" # define IS_WAYLAND_DISPLAY() mozilla::widget::GdkIsWaylandDisplay() #else # define IS_WAYLAND_DISPLAY() false #endif // // NS_NewResizerFrame // Loading Loading @@ -191,7 +198,9 @@ nsresult nsResizerFrame::HandleEvent(nsPresContext* aPresContext, // Don't allow resizing a window or a popup past the edge of the screen, // so adjust the rectangle to fit within the available screen area. if (window) { // Don't check it on Wayland as we can't get absolute window position // there. if (window && !IS_WAYLAND_DISPLAY()) { nsCOMPtr<nsIScreen> screen; nsCOMPtr<nsIScreenManager> sm( do_GetService("@mozilla.org/gfx/screenmanager;1")); Loading @@ -210,7 +219,7 @@ nsresult nsResizerFrame::HandleEvent(nsPresContext* aPresContext, rect.IntersectRect(rect, screenRect); } } } else if (menuPopupFrame) { } else if (menuPopupFrame && !IS_WAYLAND_DISPLAY()) { nsRect frameRect = menuPopupFrame->GetScreenRectInAppUnits(); nsIFrame* rootFrame = aPresContext->PresShell()->GetRootFrame(); nsRect rootScreenRect = rootFrame->GetScreenRectInAppUnits(); Loading