Skip to content

Appkit coords

John Ralls requested to merge jralls/gtk:appkit-coords into gtk-3-24

A somewhat different fix for #1593 (closed) replacing !531 (closed). This places the coordinate-translation code in gdkdisplay-quartz so that it's in the same file as the monitor configuration and removing the need for gdkdisplay-quartz.c or gdkmonitor-quartz.c to include gdkscreen-quartz.h . The translation offset between Gdk and AppKit (NSScreen) coordinates is encoded as the x,y of a GdkRectangle that also provides the overall display size to gdkscreen-quartz.

Since gdkwindowimpl's get_monitor_for_rect wants run a for-loop over the monitors this MR also converts from a GHashTable to a GPtrArray as the container for monitors, removing a somewhat tortured index-to-hashkey scheme.

Merge request reports