2024-07-23 13:06:11 +00:00
|
|
|
diff -up firefox-128.0/widget/gtk/nsWindow.cpp.mozilla-bmo1636168-fscreen firefox-128.0/widget/gtk/nsWindow.cpp
|
|
|
|
--- firefox-128.0/widget/gtk/nsWindow.cpp.mozilla-bmo1636168-fscreen 2024-07-04 18:20:43.000000000 +0200
|
|
|
|
+++ firefox-128.0/widget/gtk/nsWindow.cpp 2024-07-16 14:54:21.026716936 +0200
|
|
|
|
@@ -174,7 +174,8 @@ const gint kEvents = GDK_TOUCHPAD_GESTUR
|
2024-06-24 08:50:51 +00:00
|
|
|
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |
|
|
|
|
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
|
|
|
|
GDK_SMOOTH_SCROLL_MASK | GDK_TOUCH_MASK | GDK_SCROLL_MASK |
|
|
|
|
- GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK;
|
|
|
|
+ GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK |
|
|
|
|
+ GDK_FOCUS_CHANGE_MASK;
|
|
|
|
|
|
|
|
/* utility functions */
|
|
|
|
static bool is_mouse_in_window(GdkWindow* aWindow, gdouble aMouseX,
|
2024-07-23 13:06:11 +00:00
|
|
|
@@ -430,7 +431,8 @@ nsWindow::nsWindow()
|
2024-06-24 08:50:51 +00:00
|
|
|
mResizedAfterMoveToRect(false),
|
|
|
|
mConfiguredClearColor(false),
|
|
|
|
mGotNonBlankPaint(false),
|
|
|
|
- mNeedsToRetryCapturingMouse(false) {
|
|
|
|
+ mNeedsToRetryCapturingMouse(false),
|
|
|
|
+ mPendingFullscreen(false) {
|
|
|
|
mWindowType = WindowType::Child;
|
|
|
|
mSizeConstraints.mMaxSize = GetSafeWindowSize(mSizeConstraints.mMaxSize);
|
|
|
|
|
2024-07-23 13:06:11 +00:00
|
|
|
@@ -5374,6 +5376,19 @@ void nsWindow::OnWindowStateEvent(GtkWid
|
2024-06-24 08:50:51 +00:00
|
|
|
ClearTransparencyBitmap();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // 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;
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
|
|
|
void nsWindow::OnDPIChanged() {
|
2024-07-23 13:06:11 +00:00
|
|
|
@@ -7526,6 +7541,7 @@ nsresult nsWindow::MakeFullScreen(bool a
|
2024-06-24 08:50:51 +00:00
|
|
|
|
2024-07-23 13:06:11 +00:00
|
|
|
if (mKioskMonitor.isSome()) {
|
|
|
|
KioskLockOnMonitor();
|
|
|
|
+ mPendingFullscreen = true;
|
|
|
|
} else {
|
|
|
|
gtk_window_fullscreen(GTK_WINDOW(mShell));
|
|
|
|
}
|
|
|
|
diff -up firefox-128.0/widget/gtk/nsWindow.h.mozilla-bmo1636168-fscreen firefox-128.0/widget/gtk/nsWindow.h
|
|
|
|
--- firefox-128.0/widget/gtk/nsWindow.h.mozilla-bmo1636168-fscreen 2024-07-04 18:20:43.000000000 +0200
|
|
|
|
+++ firefox-128.0/widget/gtk/nsWindow.h 2024-07-16 14:25:51.636952919 +0200
|
|
|
|
@@ -758,6 +758,7 @@ class nsWindow final : public nsBaseWidg
|
2024-06-24 08:50:51 +00:00
|
|
|
* move-to-rect callback we set mMovedAfterMoveToRect/mResizedAfterMoveToRect.
|
|
|
|
*/
|
|
|
|
bool mWaitingForMoveToRectCallback : 1;
|
|
|
|
+ bool mPendingFullscreen : 1;
|
|
|
|
bool mMovedAfterMoveToRect : 1;
|
|
|
|
bool mResizedAfterMoveToRect : 1;
|
|
|
|
|