diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp index 2bf27a461a3c..9d8367f728b8 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp @@ -5715,6 +5715,11 @@ nsresult nsWindow::MakeFullScreen(bool aFullScreen, nsIScreen* aTargetScreen) { return NS_ERROR_NOT_AVAILABLE; } + bool wasFullscreen = mSizeState == nsSizeMode_Fullscreen; + if (aFullScreen != wasFullscreen && mWidgetListener) { + mWidgetListener->FullscreenWillChange(aFullScreen); + } + if (aFullScreen) { if (mSizeMode != nsSizeMode_Fullscreen) mLastSizeMode = mSizeMode;