[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1648.0. "Any way to give up keyboard focus when another window takes only pointer focus?" by VMSNET::BONNE () Wed Nov 01 1989 14:31

    I have a customer who has 2 applications that "know about"
    each other but are seperate from each other.  When App1 has MB1
    pressed, it takes keyboard and pointer focus.  All works great.  When
    App2 has MB1 pressed, it only wants pointer focus so App1 still has
    keyboard focus.  App2 works great because it is using push buttons and
    other graphics based input but if he types on the keyboard, App1 gets
    it.... 
    
    How can App1 "give up" keyboard input, (and where would it go..)
    assuming App2 doesn't want it?  I've gone over things like having App2
    take keyboard focus and just not do anything with keyboard input..
    I've suggested also that could create a child of App1 that he does not map
    that takes the keyboard if it loses pointer focus, but this is not very
    elegant.. I don't think they have developed App2 anyway.. just App1.
    
    Any ideas?
    
    JimJim
T.RTitleUserPersonal
Name
DateLines
1648.1Window manager hints?DECWIN::FISHERBurns Fisher 381-1466, ZKO3-4/W23Thu Nov 02 1989 22:066
    I isn't there a way to tell the window manager that you are not
    interested in kb focus so that it will not give it to you?  (I've never
    done it...just a random memory)
    
    Burns
    
1648.2clock does it.RIPPLE::FARLEE_KEInsufficient Virtual...um...er...Fri Nov 03 1989 11:5410
>    I isn't there a way to tell the window manager that you are not
>    interested in kb focus so that it will not give it to you?  (I've never
>    done it...just a random memory)
    
I don't knoe the technique, but CLOCK does it.
You cannot give CLOCK the KB focus, but it will respond to a double-click.

Kevin    

1648.3LEOVAX::TREGGIARIMon Nov 06 1989 07:5420
>    How can App1 "give up" keyboard input, (and where would it go..)
>    assuming App2 doesn't want it?  I've gone over things like having App2
>    take keyboard focus and just not do anything with keyboard input..
>    I've suggested also that could create a child of App1 that he does not map
>    that takes the keyboard if it loses pointer focus, but this is not very
>    elegant.. I don't think they have developed App2 anyway.. just App1.
>    
>    Any ideas?
     
    Keyboard input focus is always assigned somewhere, so there is no way
    to give it up without having someone else take it.  If you want it
    to look to the user as if "no-one" has the input focus, you'll need
    to have App2 (or something else) take it and ignore all keyboard input.
    
    I'm not sure why you want to do this though.  In the DECwindows
    style it's quite natural for an application to keep input focus
    while you "mouse" in another application.
    
    Leo
       
1648.4KONING::KONINGNI1D @FN42eqWed Nov 08 1989 10:548
I frequently get into situations where no window appears to have focus --
certainly no window has its banner lit up to indicate focus.  This is
with V1.  It has an annoying habit of misplacing the focus as windows
come and go, particularly if I iconify/deiconify quickly.

So I don't understand the statement that focus is always assigned somewhere.

	paul
1648.5My mistakeLEOVAX::TREGGIARIWed Nov 08 1989 14:029
> So I don't understand the statement that focus is always assigned somewhere.

Oops.  I was wrong.  I just re-read the protocol and you can call 
XSetInputFocus and give it a focus window of None.  It says:

"If None is specified as the focus, all keyboard events are discarded until
 a new focus window is set."

Leo
1648.6VMSNET::BONNEFri Nov 10 1989 13:5910
    Re: .5
    Does this mean that pointer and keyboard focus will be none?
    He wants the second application to take pointer and no one to have
    keyboard until application 1 takes back both..
    
    Sounds like he will still have to modify application 2 though.. (which
    he doesn't have control over..)
    
    Jim
    
1648.7LEOVAX::TREGGIARIFri Nov 10 1989 14:2412
>    Does this mean that pointer and keyboard focus will be none?
>    He wants the second application to take pointer and no one to have
>    keyboard until application 1 takes back both..

Keyboard (input) focus will be none.  This does not affect pointer events.
    
>    Sounds like he will still have to modify application 2 though.. (which
>    he doesn't have control over..)

I can't think of any other way...

Leo