2022-09-27 11:18:13 +00:00
|
|
|
--- firefox-91.11.0/widget/gtk/nsWindow.cpp.D110204-fscreen.diff 2022-06-20 21:18:51.000000000 +0200
|
|
|
|
+++ firefox-91.11.0/widget/gtk/nsWindow.cpp 2022-06-21 12:21:44.892706641 +0200
|
2021-12-07 17:25:43 +00:00
|
|
|
@@ -91,6 +91,7 @@
|
|
|
|
#include "SystemTimeConverter.h"
|
|
|
|
#include "WidgetUtilsGtk.h"
|
|
|
|
#include "mozilla/X11Util.h"
|
2021-11-03 19:01:49 +00:00
|
|
|
+#include "nsIBrowserHandler.h"
|
|
|
|
|
2021-12-07 17:25:43 +00:00
|
|
|
#ifdef ACCESSIBILITY
|
|
|
|
# include "mozilla/a11y/LocalAccessible.h"
|
|
|
|
@@ -441,6 +442,7 @@ nsWindow::nsWindow()
|
|
|
|
mHasMappedToplevel(false),
|
|
|
|
mRetryPointerGrab(false),
|
|
|
|
mSizeState(nsSizeMode_Normal),
|
|
|
|
+ mPendingFullscreen(false),
|
|
|
|
mAspectRatio(0.0f),
|
|
|
|
mAspectRatioSaved(0.0f),
|
|
|
|
mLastScrollEventTime(GDK_CURRENT_TIME),
|
2022-09-27 11:18:13 +00:00
|
|
|
@@ -4618,6 +4620,19 @@ void nsWindow::OnWindowStateEvent(GtkWid
|
2021-12-07 17:25:43 +00:00
|
|
|
ClearTransparencyBitmap();
|
2021-11-03 19:01:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Hack to ensure window switched to fullscreen - avoid to fail when starting
|
|
|
|
+ // in kiosk mode
|
|
|
|
+ if (mPendingFullscreen &&
|
|
|
|
+ !(aEvent->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)) {
|
|
|
|
+ LOG(
|
|
|
|
+ (" Window should be fullscreen, but it's not, retrying set to "
|
|
|
|
+ "fullscreen.\n"));
|
|
|
|
+ MakeFullScreen(true);
|
|
|
|
+ } else {
|
|
|
|
+ LOG((" Window successfully switched to fullscreen, happy now\n"));
|
|
|
|
+ mPendingFullscreen = false;
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
2021-12-07 17:25:43 +00:00
|
|
|
void nsWindow::OnDPIChanged() {
|
2022-09-27 11:18:13 +00:00
|
|
|
@@ -6860,6 +6875,19 @@ nsresult nsWindow::MakeFullScreen(bool a
|
2021-11-03 19:01:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+ // if in kiosk, ensure the fullscreen is called
|
|
|
|
+ nsCOMPtr<nsIBrowserHandler> browserHandler =
|
|
|
|
+ do_GetService("@mozilla.org/browser/clh;1");
|
|
|
|
+ if (browserHandler) {
|
|
|
|
+ bool isKiosk;
|
|
|
|
+ browserHandler->GetKiosk(&isKiosk);
|
|
|
|
+ if (isKiosk) {
|
|
|
|
+ LOG((" is kiosk, ensure the window switch to fullscreen\n"));
|
|
|
|
+ mPendingFullscreen = true;
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ LOG((" Cannot find the browserHandler service.\n"));
|
|
|
|
+ }
|
|
|
|
gtk_window_fullscreen(GTK_WINDOW(mShell));
|
|
|
|
} else {
|
|
|
|
mSizeMode = mLastSizeMode;
|
2022-09-27 11:18:13 +00:00
|
|
|
--- firefox-91.11.0/widget/gtk/nsWindow.h.D110204-fscreen.diff 2022-06-21 12:21:44.894706636 +0200
|
|
|
|
+++ firefox-91.11.0/widget/gtk/nsWindow.h 2022-06-21 12:25:20.985209461 +0200
|
|
|
|
@@ -767,6 +767,7 @@ class nsWindow final : public nsBaseWidg
|
|
|
|
* move-to-rect callback we set mResizedAfterMoveToRect.
|
2021-12-07 17:25:43 +00:00
|
|
|
*/
|
|
|
|
bool mWaitingForMoveToRectCallback;
|
2021-11-03 19:01:49 +00:00
|
|
|
+ bool mPendingFullscreen;
|
2022-09-27 11:18:13 +00:00
|
|
|
bool mResizedAfterMoveToRect;
|
2021-11-03 19:01:49 +00:00
|
|
|
|
|
|
|
/**
|