Subject: Re: Notification: incoming/812

From: Dominik Vogt <[email-masked]>
Date: Tue, 1 Jan 2002 16:31:11 +0100

On Fri, Nov 23, 2001 at 02:44:02AM -0600, fvwm-bug wrote:
> FVWM Bug Tracking notification
> 
> new message incoming/812
> 
> Message summary for PR#812
> 	From: [email-masked]
> 	Subject: loss of focus after app.menu popdown
> 	Date: Fri, 23 Nov 2001 02:44:01 -0600
> 	0 replies 	0 followups
> 
> Full_Name: Mark Rainford
> Version: 2.4.3
> CVS_Date: 
> OS: Solaris 7
> X_Server: Xsun, also vnc
> Submission from: (NULL) (193.128.26.65)
> 
> 
> When an application popup menu is popped down for the second time then
> text
> entry fields in the application no longer accept text; this remains until
> focus is moved to another window and then returned to the app.
> 
> Eg use this http
> 
> <FORM METHOD="POST" ACTION="gibberish">
> <SELECT NAME="QueryType">
> <OPTION VALUE="Eggs" SELECTED>Eggs
> <OPTION VALUE="Spam" >Spam
> <OPTION VALUE="Bacon">Bacon
> </SELECT>
> <INPUT TYPE="TEXT" NAME="anytext" VALUE="" SIZE="15" >
> </FORM>
> 
> Use mouse to popup menu, close menu either by selecting or hitting ESC,
> click text field and type a letter - letter seen okay. Popup menu,
> close again, click text field and type a letter - no letter appears. Use
> mouse to move focus to another window, then back again, click text field
> and
> type a letter - letter seen okay.
> 
> I've hacked a local fix by inserting FOCUS_SET(Tmp_win->w); at
> fvwm/events.c:HandleEnterNotify() line 1919, but I don't think this is a
> proper fix.
> 
>   if (HAS_MOUSE_FOCUS(Tmp_win) || HAS_SLOPPY_FOCUS(Tmp_win))
>   {
>     SetFocusWindow(Tmp_win, 1);
>     FOCUS_SET(Tmp_win->w); 		/* <--- HACK HACK HACK */
>   }
> 
> It seems to me that SetFocusWindow()->MoveFocus() makes the mistake of
> thinking there is no need to restore focus to the app window after the
> popup menu which grabbed it is popped down, because it sees
> (  Fw == ffw_old) is true.
> 
> I suspect one of Fw or ffw_old should be cleared when the FocusOut event
> with mode Grab is received by the app window.
> 
> I can supply the event sequences captured by xscope(1) if this helps.

Fixed with the next releases (2.4.5/2.5.0) or tomorrow's snapshot.
I tested this with Ddd, but I'm quite sure the fix helps with
other apps too.  'Fix' may not be the correct word since its more
a hack and the applications are broken in the first place.  For
some reason they lose track of their internal focused sub window
if they do not continually get the focus again and again.  If that
does not solve your problem, please report back.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
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]