Display an app-less floating window without taking focus
Display an app-less floating window without taking focus
- Subject: Display an app-less floating window without taking focus
- From: Wade Tregaskis <email@hidden>
- Date: Thu, 11 Mar 2004 13:33:33 +1100
It's hard to fit this into the subject, although it's a pretty simple
idea, so here it is in full: I want to create a window in my Cocoa app
(which has LSUIElement set to 1) which floats just below the menu bar
(I've got that bit via setLevel:), is translucent (setAlpha: etc),
accepts mouse clicks in order to move it or trigger buttons in it (got
that; default behaviour), BUT - doesn't take focus from any other
window (even when manipulated) and doesn't accept any sort of key
events or shortcuts. i.e. apart from limited interaction via the
mouse, it should be "invisible" to user input.
In short, I can't figure out how to do this. The window doesn't accept
first responder, doesn't allow itself to become main or key, yet still
can accept focus and receive key events. It seems I'm being tripped up
by the fact that focus can still shift to my application, even if it
has no menu bar or similar, and consequently my window is becoming
key/main/whatever as a result of my app coming to the front. Or
somesuch.
I've pretty much run out of basic things to try. As I mentioned, I've
been up and down the view hierarchy and responder chain in brief,
without any luck.
FWIW, I have tried searching the list archives and googling, but this
is a tricky topic to specify, since there's so many keywords in various
popular areas. After going through nearly a hundred emails in the
archives, and about as many google results, I gave up. But I'm pretty
sure this has come up before.
Wade Tregaskis
-- Sed quis custodiet ipsos custodes?
_______________________________________________
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.