[comp.windows.x] focus window interface question

chac@aratar.UUCP (Chuck Clanton) (10/26/88)

i cannot figure out how to implement a particular interface in X.

i have been using window systems for a number of years, and still find that 
with most windowing interfaces i end up typing into the "wrong" window a 
disconcerting amount of the time ("focus" errors).  the feedback i currently 
have available from X includes 1) change in title bar appearance, 2) change 
in border appearance, and 3) change in cursor appearance (sometimes).  when
i am intently concentrating on a task, these are not adequate to prevent
errors.  there was one window system where i never made this unpleasant
mistake--rob pike's mux on the blit.  since that was a click to focus 
interface, i wondered if the positive click selection was the key.  after 
experimenting with this under X, it didnt seem so but perhaps it was some 
detail of the blit's particular click to focus mechanics.  recently i have 
converted to using pike's sam editor, which has many similarities to mux
under X, and i still make focus errors.  it must be something else.

another feature on the blit was that every window except the visible part 
of the current window had a very light stipple--a dot on a 1/2 inch(?) grid 
over the entire window except the visible part of the current window.  
perhaps the state of the window i was looking at was always subliminally 
apparent because of this.  to find out if this was the key factor, i have 
thought about trying to implement this under X.  but i cannot figure out how 
or where to do it.   

my first thought was that this is a window manager issue.  if there were 
windows with appropriate transparency properties, i can imagine doing this 
in much the same way that some window managers maintain title bars except 
with an overlapping rather than the mostly obscured window of the title bar.
but no such windows exist.  i dont know if a window manager can insert 
itself between the application and the server enough to somehow impose its 
will on every display operation, but that seems philosophically wrong and 
likely to fail in subtle cases.  of course, one could extend the X server 
to do it i suppose...but isnt that a bit like saying "let's put it in the 
kernel" which might be attractive in each individual case, but is extremely 
unattractive in the sum of all individual cases.

can anyone suggest a way to do this?  i am not particularly worried about 
performance, i am just interested in testing the idea right now.  or do you
have other suggestions about how to provide better feedback about the focus 
window?  replies that do not seem of general interest can be sent directly 
to me, and if there is interest and enough material, i will summarize to 
the net.

jps@cat.cmu.edu (James Salsman) (11/01/88)

In article <317@aratar.UUCP> chac@aratar.UUCP (Chuck Clanton) writes:
> i have been using window systems for a number of years, and still find that 
> with most windowing interfaces i end up typing into the "wrong" window a 
> disconcerting amount of the time ("focus" errors).  

I think that this is a fundamental stimulus-response compatibility issue.

Click to focus (ala Macintosh) works well for beginners as
well as those who are well-aquanted with the interface.
Mouse position for focus trips up experts and novices alike.

But, the best solution should be to select keyboard focus
from the KEYBOARD, ala the TI Explorer.  This lets experts
WIN BIG in time-for-task, but you have to teach keyboard
commands to novices who complain "why can't I use the
mouse?"  This isn't a problem on the TI since windows
usually take the whole screen thereby completly covering the
other windows.  Keep in mind that the Explorer's programming
interface is designed for programmers, and if you develop
a product for a USER, the interface is up to you.

:James
-- 

:James P. Salsman (jps@CAT.CMU.EDU)

bader+@ANDREW.CMU.EDU (Miles Bader) (11/02/88)

cat.cmu.edu!jps@pt.cs.cmu.edu  (James Salsman) writes:
> Mouse position for focus trips up experts and novices alike.

I presume you mean "novices & experts who aren't used to it."  As
someone who is very used to (and likes) focus-follows-mouse, I find
click-focus quite irritating, as it requires much more thought to
change focus when your hand is not on the mouse (with ffm, I can just
backhand the mouse into the new window, without ever really grabbing
it).

I agree that keyboard control of mouse focus is nice, but as an
ADDITION to the mouse control; with lots of windows, it could get
pretty time-consuming...

-Miles