Hello!

Im porting an application to Leopard written in Qt - kinda onscreen
keyboard.

The thing is I need to make MainWindow of the application not accepting
keyboard focus (user focus) when user clicks on it choosing possible letters
(keep it always inactivated). So when user has chosen the letter it could be
pasted in other system-wide applications with keyboard focus.

I have already tried these:

in Qt

   setWindowFlags(Qt::Tool|Qt::FramelessWindowHint);

   setFocusPolicy(Qt::NoFocus);

    - the window stops getting focusEvents but still grabs keyboard focus

since Qt 4.4 utilizes Carbon I've tried setting kHIWindowBitNoActivates or
kWindowNoActivatesAttribute for this WindowRef

Both variants didn't work.

Are there any workarounds in Cocoa ?  I can try Qt 4.5 beta if they make it
based on Cocoa

Afterwards when the window is off-focus I need to send the key to other
application which currently has user focus.

How can be that implemented (NSPasteboard ?) ?

In linux version disabling focus made through Xorg calling XFree() for XAtom
 WM_TAKE_FOCUS. Can that be used on Mac (I have read it has X11 port)?

Any help will be appreciated!

TIA,
Sergey
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to