Subject: focus problem when pointer is grabbed

From: Dominik Vogt <[email-masked]>
Date: Thu, 5 Apr 2001 13:50:15 +0200

Triggered by Tim's bug report, I noticed that Scr.Focus is NULL
inside complex functions (which causes the problem with the
Prev command).  There are some commands that operate on the
focused window - which will fail under certain circumstances in
complex functions.  Scr.Focus is set to NULL in misc.c (GrabEm).
I could find the corresponding code even in 2.0.46.  I rewrote
the code and removed the ...Focus members from the screen
structure.  They are now handled locally in focus.c and the
caller has to use access functions to get them.  I hope this
reduces the chance of using these values incorrectly.  But I fear
that said code in misc.c is one big bug.  What would be the
correct way to write this?

    if (!Scr.Focus || do_accept_input_focus(Scr.Focus))
    {
      /* But do not grab if the window does not accept input focus from the
       * window manager */
      if(Scr.PreviousFocus == NULL)
    Scr.PreviousFocus = Scr.Focus;
      DeleteFocus(0);
    }

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
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]