macos: fix configure, move-resize, and compute-size
authorChristian Hergert <christian@hergert.me>
Wed, 16 Feb 2022 10:50:51 +0000 (02:50 -0800)
committerChristian Hergert <christian@hergert.me>
Fri, 18 Feb 2022 10:50:46 +0000 (02:50 -0800)
commit4c08d1643f4b92b5e3c53c5f02a3508d42625cba
treef8b7b11681ed17f0cfe217c533fefc4f754b48ec
parent49b0ee21c1cf7c907b545155fbba9bfcce04c615
macos: fix configure, move-resize, and compute-size

This significantly cleans up how we handle various move-resize, compute-
size, and configure (notification of changes) in the macOS GDK backend.

Originally when prototyping this backend, there were some bits that came
over from the quartz backend and some bits which did not. It got confusing
and so this makes an attempt to knock down all that technical debt.

It is much simpler now in that the GdkMacosSurface makes requests of the
GdkMacosWindow, and the GdkMacosWindow notifies the GdkMacosSurface of
changes that happen.

User resizes are delayed until the next compute-size so that we are much
closer to the layout phase, reducing chances for in-between frames.

This also improves the situation of leaving maximized state so that a
grab and drag feels like you'd expect on other platforms.

I removed the opacity hack we had in before, because that is all coming
out anyway and it's a bit obnoxious to maintain through the async flows
here.
gdk/macos/GdkMacosWindow.c
gdk/macos/gdkmacosdisplay.c
gdk/macos/gdkmacossurface-private.h
gdk/macos/gdkmacossurface.c
gdk/macos/gdkmacostoplevelsurface-private.h
gdk/macos/gdkmacostoplevelsurface.c