[webkit-changes] [WebKit/WebKit] 989de9: [GTK4] Toplevel window state change is not handled...
Carlos Garcia Campos
noreply at github.com
Thu Aug 17 23:02:05 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 989de9dbc7acaa3042ca42a0cc2dabbe8478121a
https://github.com/WebKit/WebKit/commit/989de9dbc7acaa3042ca42a0cc2dabbe8478121a
Author: Carlos Garcia Campos <cgarcia at igalia.com>
Date: 2023-08-17 (Thu, 17 Aug 2023)
Changed paths:
M Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
M Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
Log Message:
-----------
[GTK4] Toplevel window state change is not handled properly
https://bugs.webkit.org/show_bug.cgi?id=260352
Reviewed by Michael Catanzaro.
We monitor the toplevel window state to detect when the window is
minimized to set the web pages as not visible and pause the rendering.
In GTK3 we already get a change mask, so we do nothing if iconized state
hasn't changed. In GTK4 we get the new state, but we don't know what
changed, so we are actually changing the visibility of pages for any
state change. We need to handle the changed mask manually.
This patch also improves the way we handle visibility changes in
general, because in GTK4 we get a size allocate after the map, which
means we send the visibility change message before the resize, so end up
resuming rendering with 0x0 size in the page. To try to avoid this we
check if we have a size already on map, before the visibility check, and
set the size to make sure the resize is sent before.
* Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseSetSize):
(webkitWebViewBaseSizeAllocate):
(webkitWebViewBaseMap):
(toplevelWindowStateChanged):
(toplevelWindowRealized):
(webkitWebViewBaseRoot):
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
(WebKit::DrawingAreaCoordinatedGraphics::DrawingAreaCoordinatedGraphics):
Canonical link: https://commits.webkit.org/267032@main
More information about the webkit-changes
mailing list