Why does my NSWindow only receive mouseOver events the first time?
Posted
by DanieL
on Stack Overflow
See other posts from Stack Overflow
or by DanieL
Published on 2010-05-17T00:19:21Z
Indexed on
2010/05/17
0:30 UTC
Read the original article
Hit count: 383
I have an application where a borderless window is shown and hidden, using orderOut and orderFront. When it is visible, I want the it to become the key window when the mouse moves over it. So far I've done this:
- In awakeFromNib I have set its first responder to itself.
- In the window's constructor I set accepts mouse events to YES.
- In the mouseMoved method, I use makeKeyAndOrderToFront.
My problem is, that this only works the first time I move the mouse over the window. After that, it doesn't receive any mouseOver events. I've tried checking the firstResponder but as far as I can tell it never changes from the window.
Any ideas what I can do to get this working?
© Stack Overflow or respective owner