Files
gtk3/gdk
John Ralls 345bfb494a Use consistent coordinates in get_toplevel_from_ns_event.
[NSView frame] returns a rectangle in the superview's coordinates, and the
superview of an NSWindow's content view (which is the only NSView that
GdkQuartz instantiates) is an undocumented NSThemeFrame. While it happens
to have the same origin as the content view and the same size as the
window's frame this isn't documented and so could change without notice.
Convert the window frame coordinates to the view's coordinate system to
ensure consistency.

Use the view's bounds instead of its frame: The bounds rectangle is in the
view's coordinate system. Use the parent NSWindow's frame instead of the
private NSThemeFrame's. This ensures that all coordinate comparisons have
the same reference.

Finally, the macOS coordinate systems origin is at the bottom left, so the
title bar is between the content view's height and the window's height,
not in negative y in the view's coordinates. Adjust the y comparisons
accordingly.

Fixes #6297
2023-12-25 11:10:12 -08:00
..
2019-03-27 16:03:43 +00:00
2017-05-22 14:26:32 +01:00
2022-03-03 21:44:38 +01:00
2016-08-23 21:01:44 +02:00
2016-06-09 17:45:40 +01:00
2019-05-31 11:12:29 -07:00
2016-08-23 21:01:44 +02:00
2016-08-23 21:01:44 +02:00
2016-08-23 21:01:44 +02:00
2016-05-08 15:34:28 +02:00
2019-05-31 11:12:29 -07:00
2016-06-09 17:45:40 +01:00
2023-11-19 21:10:05 -05:00
2017-12-25 23:00:30 -05:00
2017-12-25 23:00:30 -05:00
2016-05-08 15:34:28 +02:00
2016-04-18 11:46:58 -04:00
2019-06-06 17:17:20 -07:00
2019-06-06 17:17:20 -07:00
2015-10-03 22:26:27 -04:00
2019-05-31 11:12:29 -07:00
2017-11-13 23:42:51 +01:00
2016-10-28 06:04:58 +02:00
2016-10-28 06:04:58 +02:00
2023-11-19 12:17:37 -05:00