macos: leave note about monitor discovery

This commit is contained in:
Christian Hergert 2022-02-28 11:20:48 -08:00
parent 63f20b173d
commit 91f5bfd211
2 changed files with 12 additions and 0 deletions

View File

@ -26,7 +26,9 @@
#include "gdkdisplaylinksource.h" #include "gdkdisplaylinksource.h"
#include "gdkdebug.h"
#include "gdkmacoseventsource-private.h" #include "gdkmacoseventsource-private.h"
#include "gdkmacosmonitor-private.h"
#include "gdk-private.h" #include "gdk-private.h"
static gint64 host_to_frame_clock_time (gint64 val); static gint64 host_to_frame_clock_time (gint64 val);
@ -173,6 +175,7 @@ gdk_display_link_source_new (CGDirectDisplayID display_id,
{ {
GdkDisplayLinkSource *impl; GdkDisplayLinkSource *impl;
GSource *source; GSource *source;
char *name;
source = g_source_new (&gdk_display_link_source_funcs, sizeof *impl); source = g_source_new (&gdk_display_link_source_funcs, sizeof *impl);
impl = (GdkDisplayLinkSource *)source; impl = (GdkDisplayLinkSource *)source;
@ -213,6 +216,14 @@ gdk_display_link_source_new (CGDirectDisplayID display_id,
impl->refresh_interval = period * 1000000L; impl->refresh_interval = period * 1000000L;
} }
name = _gdk_macos_monitor_get_connector_name (display_id);
GDK_NOTE (MISC,
g_message ("Monitor \"%s\" discovered with Refresh Rate %d and Interval %"G_GINT64_FORMAT,
name ? name : "unknown",
impl->refresh_rate,
impl->refresh_interval));
g_free (name);
/* Wire up our callback to be executed within the high-priority thread. */ /* Wire up our callback to be executed within the high-priority thread. */
CVDisplayLinkSetOutputCallback (impl->display_link, CVDisplayLinkSetOutputCallback (impl->display_link,
gdk_display_link_source_frame_cb, gdk_display_link_source_frame_cb,

View File

@ -24,6 +24,7 @@
#include "gdkmacosdisplay.h" #include "gdkmacosdisplay.h"
#include "gdkmacosmonitor.h" #include "gdkmacosmonitor.h"
#include "gdkmacossurface.h"
#include "gdkmonitorprivate.h" #include "gdkmonitorprivate.h"