How to detect if my window gets focus in program
How to detect if my window gets focus in program
- Subject: How to detect if my window gets focus in program
- From: Xiaotao Guo <email@hidden>
- Date: Wed, 10 Jul 2002 18:50:39 -0600
Hi, there:
My program has a floating window. Due to some reasons, I have to set
LSBackgroundOnly to be 1 and no apple menu. Now, I want to detect the event
if this window's title bar is clicked (the window gets focus), but not the
clicking in the window. Does anyone know if there is any way to do this in
the program?
I cannot use the way of checking if this window becomes key or main window,
because the clicking in the window can make it key window. I need to
distingush the clicking on the titel bar and the clicking in the window.
Another thing about my program is, if I click in the window (like clicking
some button), my window seems get focus (the title bar is opaque and the
buttons on title bar are colorful). At this time, I can still access the
apple menu of the application right under my window (my app doesn't have
menu, just a small window), and that application's window seems get focus
too (the title bar and buttons). But if I click on my window's title bar,
the other application doesn't get focus. That is why I want to check if the
click is in the window or on the title bar.
Any suggestions are really appreciated.
X. Guo
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.