Re: Feature wish: AutoFocusTransients

From: Kai Grossjohann (grossjohann@charly.cs.uni-dortmund.de)
Date: Tue Oct 28 1997 - 19:23:43 CET


>>>>> On 27 Oct 1997, Kai Grossjohann said:

  Kai> I wish there was a feature that could be turned on so that
  Kai> newly appearing transient windows automatically had the focus.
  Kai> I'm not sure if I want that in all cases or only if the new
  Kai> transient window is a TransientFor the window that currently
  Kai> has focus.

I have just modified my copy of ctwm-3.5beta2 as follows:

,----- gdiff -bwu events.c.dist events.c
| --- events.c.dist Tue Oct 28 09:26:03 1997
| +++ events.c Tue Oct 28 19:14:12 1997
| @@ -2279,6 +2279,9 @@
| if (Scr->ClickToFocus &&
| Tmp_win->wmhints &&
| Tmp_win->wmhints->input) SetFocus (Tmp_win, CurrentTime);
| + if (Tmp_win->transient &&
| + Tmp_win->wmhints &&
| + Tmp_win->wmhints->input) SetFocus (Tmp_win, CurrentTime);
| break;
|
| case InactiveState:
`-----

In preliminary tests with Netscape it seemed to do the right thing.
(I could do Alt-F with the mouse pointer anywhere in the Netscape
window and immediately type the string to search for and hit return
because the `popup' window already had focus.)

Would you like to test it, too? Should I add an option for .ctwmrc to
enable or disable this?

I fear that this is altogether too simplistic, though. It might break
things all over the place. Would be nifty if it did really work,
though.

Whatcha think?
kai

-- 
~/.signature: No such file or directory



This archive was generated by hypermail 2.1.2 : Sat Jun 22 2002 - 06:45:05 CEST