Skip to content

gtk4: Update to 4.20.3#25319

Merged
lazka merged 5 commits into
msys2:masterfrom
lazka:gtk4-4.20.0
Nov 27, 2025
Merged

gtk4: Update to 4.20.3#25319
lazka merged 5 commits into
msys2:masterfrom
lazka:gtk4-4.20.0

Conversation

@lazka
Copy link
Copy Markdown
Member

@lazka lazka commented Aug 30, 2025

media backend modules got removed upstream and gstreamer is always linked now

rendering is broken, so can't be merged.

GDK_DISABLE=dcomp fixes some of it. video rending is broken still

<Company> lazka: yeah, I got halfway towards the D3D renderer, ie we manage to get dcomp working now but not d3d yet
<Company> so now we have gl on dcomp, which is a kinda bad combination
<Company> it might be worthwhile to skip 4.20 on Windows - or maybe patch out dcomp to get closer to the old rendering code
[...]
<Company> lazka: oh widget-factory - I think that's a GStreamer issue where the D3D12 code gets vp9 with alpha wrong, but I never got around to investigating that

theora BBB video is also broken, but h264 works.

@lazka lazka added the blocked label Aug 30, 2025
@lazka lazka changed the title gtk4: Update to 4.20.0 gtk4: Update to 4.20.1 Sep 14, 2025
lazka added 4 commits October 10, 2025 09:17
media backend modules got removed upstream and gstreamer is always linked now
@lazka lazka changed the title gtk4: Update to 4.20.1 gtk4: Update to 4.20.2 Oct 10, 2025
This was referenced Oct 20, 2025
@otaxhu
Copy link
Copy Markdown

otaxhu commented Oct 21, 2025

Hi, I tested 4.20.2 tag in a Windows 10 VM and it works using Cairo backend and no extra arguments/env-variables, I found no rendering issues and no bugged shadows as displayed by this link you mentioned wingtk/gvsbuild#1641

Captura desde 2025-10-21 00-13-33

Video player is not working though. I've never used the video player personally, so I don't know which commit is the most recent good one in order to do a git bisect, but if you have found the regression commit, please let me know :-)

Information displayed in Inspector's "Global" tab

General Information
Name Value
Operating System Windows 10 22H2
GTK Version 4.20.2
GDK Backend Windows
GSK Renderer Cairo
Pango Fontmap win32
Media Backend gstreamer
Input Method ime
Accessibility backend test
Application
Name Value
Application ID org.gtk.Demo4
Resource Path /org/gtk/Demo4
Environment
Name Value
Prefix C:\msys64\ucrt64
Environment
LC_CTYPE=es_MX.UTF-8
PRINTER=Microsoft Print to PDF
XDG_DATA_DIRS=C:\msys64\ucrt64\share;C:\msys64\usr\local\share;C:\msys64\usr\share\
Display
Name Value
Display 1\WinSta0\Default
RGBA Visual
Composited
Monitors
Name Value
Monitor 0 (Tipo de monitor estándar) Monitor genérico que no es PnP
Description (NULL)
Connector (NULL)
Geometry 1024 × 768 at 0, 0
Pixels 1024 × 768
Size 271 × 203 mm²
Resolution 96,1 dpi
Refresh Rate 64,00 Hz
Seats
Name Value
Seat 0 Pointer, Keyboard
System Aggregated Keyboard keyboard
Layouts Español (México)
Español (México)*
System Aggregated Pointer mouse
OpenGL
Name Value
GL Renderer None
libEGL no disponible
Vulkan
Name Value
Vulkan Device None
Could not create a Vulkan instance: The requested version of Vulkan is not supported by the driver or is otherwise incompatible for implementation-specific reasons. (VK_ERROR_INCOMPATIBLE_DRIVER)

@lazka
Copy link
Copy Markdown
Member Author

lazka commented Oct 21, 2025

The rendering issues are with opengl and d3d. But good to know that cairo works fine.

@otaxhu
Copy link
Copy Markdown

otaxhu commented Oct 21, 2025

I remember GTK with GSK_RENDERER set to vulkan or gl never rendering properly on Windows, from way before 4.18, I thought that was a hardware issue with my laptop, that's why I always add something like this to all of the GTK Windows apps I've written.

#if defined(G_OS_WIN32)
if (g_getenv("GSK_RENDERER") == NULL)
{
  g_setenv("GSK_RENDERER", "cairo");
}
#endif

@taozuhong
Copy link
Copy Markdown
Contributor

taozuhong commented Oct 30, 2025

The PR should be merged, because the D3DRenderer will not port to the old version.

Or skip this version, move to GTK 4.24 directly.

@taozuhong
Copy link
Copy Markdown
Contributor

taozuhong commented Nov 23, 2025

@lazka GTK 4.20.3 is released.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this patch was upstreamed via commit https://gitlab.gnome.org/GNOME/gtk/-/commit/f071763fd69e8924c497b9b21e43ef8e80718eff. MR https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/9185 will likely backport this to 4.20.x.

@otaxhu
Copy link
Copy Markdown

otaxhu commented Nov 24, 2025

Hi again, this PR should be merged, gvsbuild repository already updated to gtk 4.20.3 and fixed the problems with the shadows (allegedly), maybe we could bring those changes to here.

wingtk/gvsbuild#1675

@lazka
Copy link
Copy Markdown
Member Author

lazka commented Nov 24, 2025

ok, I'll have a look tomorrow.

@danyeaw
Copy link
Copy Markdown
Contributor

danyeaw commented Nov 24, 2025

Actually I referenced the changes that were already here to disable dcomp. I also opened https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/9185 to bring in the cairo fix upstream.

I'm not sure what the video rendering problem is that was referenced.

@lazka
Copy link
Copy Markdown
Member Author

lazka commented Nov 25, 2025

If we merge this then some video rendering will be broken (see gtk4-widget-factory), though I don't know if there are many users using video rendering in gtk like this. On the other hand we are more closely following upstream. I'm fine with merging, if there are no objections.

@lazka lazka marked this pull request as ready for review November 25, 2025 07:29
@lazka lazka changed the title gtk4: Update to 4.20.2 gtk4: Update to 4.20.3 Nov 25, 2025
@otaxhu
Copy link
Copy Markdown

otaxhu commented Nov 25, 2025

All seems alright, tested both GL and Cairo and both rendered good, couldn't test Vulkan because didn't have the hardware, but I think it should work as well.

Video-player-gtk4.20

For context, GTK Windows apps with gtk 4.18 (and previous versions) using GL renderer looked like this, I don't exactly have a Windows screenshot, but looked exactly like this. (See this issue)

imagen

@otaxhu
Copy link
Copy Markdown

otaxhu commented Nov 26, 2025

I found that the video player problem dates back to September 2024, see the image attached to the comment.

https://gitlab.gnome.org/GNOME/gtk/-/issues/6721#note_2215021

No issue has been reported upstream in that timespan, so I think it is fine to merge this and hope that this will be resolved in the future.

@taozuhong
Copy link
Copy Markdown
Contributor

I've built the GTK 4.20.3 package on windows 25H2 with MSYS2, it works fine.

@lazka lazka merged commit 432b2d2 into msys2:master Nov 27, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants