Subject: FVWM: New feature: *FvwmTaskBarAutoFocus

From: Mohsin_Ahmed <[email-masked]>
Date: Sun, 22 Nov 1998 21:01:33 +0530

I added a new feature to Fvwm2.0.46/extras/FvwmTaskBar/FvwmTaskBar.c,
whereby keeping the cursor on a button in taskbar raises the window,
if tip is open (should be independent ideally). See diff -u below.

BTW, I don't know X so well, but I am looking at the taskbar
taking keyboard input. Let me know if you have any suggestions,
eg. left / Right arrow in TaskBar can move between windows, pressing
't' starts 'top', (configurable = button+key+action).

I also am thinking of adding a '*FvwmTaskBarQuickFocus' option,
that will do the above, without waiting for the tip.

- Mohsin.

In ~/.fvwm2rc turn on the option by:
*FvwmTaskBarAutoFocus
*FvwmTaskBarShowTips

$ cd Fvwm2.0.46/extras/FvwmTaskBar
$ diff -u FvwmTaskBar.c-orig FvwmTaskBar.c

--- fvwm-2.0.46/extras/FvwmTaskBar/FvwmTaskBar.c        Tue Sep 24 16:24:59 1996
+++ fvwm-mosh/extras/FvwmTaskBar/FvwmTaskBar.c  Sat Nov 21 13:54:59 1998
@@ -125,6 +125,7 @@
     adjust_flag    = False,
     AutoStick      = False,
     AutoHide       = False,
+    AutoFocus      = False,      // mosh
     HighlightFocus = False;
 
 unsigned int ScreenWidth, ScreenHeight;
@@ -519,7 +520,16 @@
 ******************************************************************************/
 void RedrawWindow(int force)
 {
-  if (Tip.open) RedrawTipWindow();
+    if (Tip.open){
+      RedrawTipWindow();
+
+      // 98-11-21 13:45, Mohsin_Ahmed, mailto:[email-masked].
+      if( Tip.type >= 0 && AutoFocus ){
+          SendFvwmPipe( "Iconify -1, Raise, Focus",
+                        ItemID( &windows, Tip.type ) );
+      }
+    }
+
   if (force) {
     XClearArea (dpy, win, 0, 0, win_width, win_height, False);
     DrawGoodies();
@@ -604,6 +614,8 @@
        LinkAction(&tline[Clength+6]);
       else if(mystrncasecmp(tline,CatString3(Module, "UseSkipList",""),
                            Clength+11)==0) UseSkipList=True;
+      else if(mystrncasecmp(tline,CatString3(Module, "AutoFocus",""),
+                            Clength+9)==0) AutoFocus=True;
       else if(mystrncasecmp(tline,CatString3(Module, "AutoStick",""),
                            Clength+9)==0) AutoStick=True;
       else if(mystrncasecmp(tline,CatString3(Module, "AutoHide",""),

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].