Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

First click in custom window?



I'm making an app with a custom NSWindow, similar to the sample app Round Transparent Window.  ( http://developer.apple.com/samplecode/RoundTransparentWindow/RoundTransparentWindow.html ) The app is supposed to behave like a textured or widget window, where dragging on any non-control part of the window drags the window.

My problem has to do with the first click the app receives. When some other app is in the foreground and I click-drag on my app, the window does not move. That first click doesn't even cause a MouseDown event to hit the Window or the window's Content view. Also, the same type of first mouse-down on the app causes strange dragging behavior if the click is on the NSTableView sitting in the window; the mouseDown event doesn't hit the window, but dragging causes mouseDragged events to go to the window, and not the TableView. (RoundTransparentWindow behaves the same way if you drop an NSTableView into the main view).

I feel like this behavior should be simple, but can't figure out how to get it. Is there a simple way of getting a window of this form to behave normally when it is clicked while not on top? (Failing that, is there a complex, hacky way?)

Thanks,
-Albert
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: scrolling and drawing porblems (From: Erik Buck <email@hidden>)
 >Re: scrolling and drawing porblems (From: Ivan Kourtev <email@hidden>)
 >Re: scrolling and drawing porblems (From: m <email@hidden>)
 >Re: scrolling and drawing porblems (From: Ivan Kourtev <email@hidden>)
 >Re: scrolling and drawing porblems (From: m <email@hidden>)
 >Re: scrolling and drawing porblems (From: Ivan Kourtev <email@hidden>)
 >Re: scrolling and drawing porblems (From: m <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.