macos: use display id when creating CVDisplayLink
authorChristian Hergert <christian@hergert.me>
Fri, 25 Feb 2022 21:09:31 +0000 (13:09 -0800)
committerChristian Hergert <christian@hergert.me>
Mon, 28 Feb 2022 19:36:27 +0000 (11:36 -0800)
commit4404c43cd33864d1a8c276c08c378df77d81e8d8
tree9041b43dc19d93940d90b5cef03e2d962086df40
parent92a7c7cdc3f97adc8446982a4ec62c0f73ef66c9
macos: use display id when creating CVDisplayLink

Currently we're using a display link that is for all active displays which
is just the display server trying to find some timings that try to overlap
as many as possible.

That was fine for a prototype, but we really need to do better for
situations with mixed frame rate (such as 60hz and 120hz promotion
displays). Additionally, the 144hz external monitor I have will never
reach 144hz using the current design.

This is just the first step in changing this, but the goal is to have
one of these attached to each GdkMacosMonitor which we can then use to
thaw surfaces specific to that monitor.
gdk/macos/gdkdisplaylinksource.c
gdk/macos/gdkdisplaylinksource.h
gdk/macos/gdkmacosdisplay.c