macos: add clamp helper to keep rectangle in workarea
authorChristian Hergert <christian@hergert.me>
Wed, 2 Mar 2022 08:34:27 +0000 (00:34 -0800)
committerChristian Hergert <christian@hergert.me>
Wed, 2 Mar 2022 08:34:27 +0000 (00:34 -0800)
commit27b87ebec53e1af8bc819bfdabc2bc8deaea4749
tree10c5cd332920e930cfba5379ad011beec41a1476
parent8c0df66d5fff21e8e2c8c09df8a6e726a688781a
macos: add clamp helper to keep rectangle in workarea

This helper is useful to ensure we are consistent with how we keep a
window clamped to the workarea of a monitor when placing windows on
screen. (This does not affect snap-to-edges).
gdk/macos/gdkmacosdisplay-wm.c
gdk/macos/gdkmacosmonitor-private.h
gdk/macos/gdkmacosmonitor.c