Skip to content

Some fixes for resizing of GDK/Win32 surfaces

Chun-wei Fan requested to merge win32.surface.resize into master

Hi,

This attempts to fix surface resizing where the surface resizes from the bottom and/or right edges when one attempts to resize from the left and/or top edges. This involves:

  • Cleaning up gdksurface-win32.[c|h] to remove the resized member from the GdkWin32Surface structure as we already have a structure within GdkWin32Surface that has a member that keeps track of whether the surface is being resized. This makes things clearer and makes things less prone to bugs.

  • Add a configured_rect member to the next_layout structure so that we use that when we resize, so that surfaces will resize as expected when one resizes using the left and/or top edges. Unfortunately, the surface stutters in such scenarios (although things are fine when resizing from the right and/or bottom edges), but at least will make surface resizing more intuitive. For the long run, we need to find a way to make DWM not interfere with our resizes since the technique we use in GTK-3.x via layered windows is no longer applicable since OpenGL and Vulkan do not work well with it, and so it had been dropped from GTK4 as a result, so that resizes from the left and/or top edges will work without causing the window to stutter, which will likely be in an MR of its own.

With blessings, thank you!

Edited by Chun-wei Fan

Merge request reports