GdkWindowImplQuartz *toplevel_impl;
gboolean lion;
- /* Resizing only begins if an NSLeftMouseButton event is received in
- * the resizing area. Handle anything else.
+ /* Resizing from the resize indicator only begins if an NSLeftMouseButton
+ * event is received in the resizing area.
*/
- if ([event type] != NSLeftMouseDown)
- return FALSE;
-
toplevel_impl = (GdkWindowImplQuartz *)toplevel->impl;
if ([toplevel_impl->toplevel showsResizeIndicator])
+ if ([event type] == NSLeftMouseDown &&
+ [toplevel_impl->toplevel showsResizeIndicator])
{
NSRect frame;
* the selector isRestorable to see if we're on 10.7.
* This extra check is in case the user starts
* dragging before GDK recognizes the grab.
+ *
+ * We perform this check for a button press of all buttons, because we
+ * do receive, for instance, a right mouse down event for a GDK window
+ * for x-coordinate range [-3, 0], but we do not want to forward this
+ * into GDK. Forwarding such events into GDK will confuse the pointer
+ * window finding code, because there are no GdkWindows present in
+ * the range [-3, 0].
*/
lion = gdk_quartz_osx_version () >= GDK_OSX_LION;
- if (lion && (x < GDK_LION_RESIZE ||
- x > toplevel->width - GDK_LION_RESIZE ||
- y > toplevel->height - GDK_LION_RESIZE))
- return TRUE;
+ if (lion &&
+ ([event type] == NSLeftMouseDown ||
+ [event type] == NSRightMouseDown ||
+ [event type] == NSOtherMouseDown))
+ {
+ if (x < GDK_LION_RESIZE ||
+ x > toplevel->width - GDK_LION_RESIZE ||
+ y > toplevel->height - GDK_LION_RESIZE)
+ return TRUE;
+ }
return FALSE;
}