• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mouse cursors and overlapping sibling NSViews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mouse cursors and overlapping sibling NSViews


  • Subject: Re: Mouse cursors and overlapping sibling NSViews
  • From: edward taffel <email@hidden>
  • Date: Thu, 24 Apr 2014 12:12:12 -0400

i’m probably missing something, but—
the controls appear sufficiently displaced from the rendering: can’t you decease the height of your tracking rect in order to inhibit mouseMoved in this region?

On Apr 24, 2014, at 11:20 AM, Sean McBride <email@hidden> wrote:

> On Wed, 23 Apr 2014 20:16:22 -0500, Ken Thomases said:
>
>> As far as I understood the original issue, it's that the
>> cursor is set via tracking areas and -cursorUpdate: on one view but -
>> mouseMoved: is being called on a different view.  Sean wants Cocoa to be
>> consistent about which view is asked to update the cursor and which is
>> told that the mouse has moved.
>>
>> But I may have misunderstood.
>>
>> (Of course, the better solution, is seems to me, is to stop using
>> sibling views in a situation that calls for subviews.)
>
> That possibility is alas not available because my main custom view is 'layer hosting' and such views are not allowed to have subviews.
>
> I think a screenshot and names would help:
> <https://www.rogue-research.com/CocoaHierarchy.png>
>
> My *actual* view hierarchy:
> - BSStageHolderView (layer backed)
>   - BSStageView (layer hosting)
>   - NSButton
>   - NSPopUpButton
>
> But for visual, mouse click, and mouse cursor purposes, I wish my hierarchy was:
> - BSStageHolderView (layer backed)
>   - BSStageView (layer hosting)
>     - NSButton
>     - NSPopUpButton
>
> By having BSStageHolderView's subviews array ordered as they are above, the subviews are visually correct and the mouse hits are correct, but I'm having trouble with the mouse cursors.
>
> Tracking areas are nice, but limited to rects, and I have circular areas to deal with too.  Other than using hundreds of them to approximate a circle it seems I must use mouseMoved: for cursors.  Also my cursors need to change based on modifier keys.
>
> It's mostly working fine, except when I hover the mouse over the NSButtons, then BSStageView's mouseMoved: get called.
>
> First, I wanted to understand if that's even expected behaviour, but have found no answer in docs.  I guess it is an edge case.
>
> Cheers,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 email@hidden
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Mouse cursors and overlapping sibling NSViews
      • From: Sean McBride <email@hidden>
References: 
 >Mouse cursors and overlapping sibling NSViews (From: Sean McBride <email@hidden>)
 >Re: Mouse cursors and overlapping sibling NSViews (From: Ken Thomases <email@hidden>)
 >Re: Mouse cursors and overlapping sibling NSViews (From: Sean McBride <email@hidden>)
 >Re: Mouse cursors and overlapping sibling NSViews (From: Ken Thomases <email@hidden>)
 >Re: Mouse cursors and overlapping sibling NSViews (From: Quincey Morris <email@hidden>)
 >Re: Mouse cursors and overlapping sibling NSViews (From: Ken Thomases <email@hidden>)
 >Re: Mouse cursors and overlapping sibling NSViews (From: Sean McBride <email@hidden>)

  • Prev by Date: Re: showing load progress for autosaved documents
  • Next by Date: Re: Mouse cursors and overlapping sibling NSViews
  • Previous by thread: Re: Mouse cursors and overlapping sibling NSViews
  • Next by thread: Re: Mouse cursors and overlapping sibling NSViews
  • Index(es):
    • Date
    • Thread