Subject: Notification: incoming/812

From: [email-masked]
Date: Fri, 23 Nov 2001 02:44:02 -0600

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

====> ORIGINAL MESSAGE FOLLOWS <====

>From [email-masked] Fri Nov 23 02:44:02 2001
From: [email-masked]
To: [email-masked]
Subject: loss of focus after app.menu popdown
Date: Fri, 23 Nov 2001 02:44:01 -0600

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.

--
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]

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 23 Nov 2001 11:27:29 +0100

> type a letter - letter seen okay.

I see no problem with my configuration using either netscape 4.7x
or mozilla 0.93.  Which browser did you use?  And please see if
this also happens if you use an empty configuration file.  If not,
try to strip down your config file so that the problem still
happens and post the result.

> I can supply the event sequences captured by xscope(1) if this helps.

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]

---

From: Mark Rainford <[email-masked]>
Date: Fri, 23 Nov 2001 15:05:08 +0000

> happens and post the result.

I still get it with the default fvwm config (no personal or site config used):

[FVWM][main]: <<ERROR>> Cannot read startup file, tried: 
        /home/testuser/.fvwm/.fvwm2rc
        /home/testuser/.fvwm2rc
        /usr/local/depot/fvwm-2.4.3/share/fvwm/.fvwm2rc
        /usr/local/depot/fvwm-2.4.3/share/fvwm/system.fvwm2rc
        /usr/local/depot/fvwm-2.4.3/etc/system.fvwm2rc

Netscape version is 4.78 - but note we originally encountered the problem with a locally developed Motif app. on changing from fvwm 2.0.46 to 2.4.3; then confirmed it was not (just) the app. author's fault by finding the same problem in Netscape. However the fault is not present in Mozilla 0.9.6 .

Xservers tried are Xsun (Solaris 7 & 8), Xvnc(unix) 3.3.3r1.

-- 

Regards,  Mark.

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 28 Nov 2001 08:49:15 +0100

>         /usr/local/depot/fvwm-2.4.3/etc/system.fvwm2rc

Still doesn't happen for me (netscape 4.76).

> Netscape version is 4.78 - but note we originally encountered
> the problem with a locally developed Motif app. on changing from
> fvwm 2.0.46 to 2.4.3; then confirmed it was not (just) the app.
> author's fault by finding the same problem in Netscape.

Of course that doen't means that it can't be something the
application is doing wrong.  I sometimes have similar problems
with Netscape or Mozilla (can't remember which) when it starts up
initially, but I don't know a way to reproduce this on purpose.

> However the fault is not present in Mozilla 0.9.6 .
> 

Bye

Dominik ^_^  ^_^

---

From: Mark Rainford <[email-masked]>
Date: Wed, 28 Nov 2001 09:58:47 +0000

> initially, but I don't know a way to reproduce this on purpose.

I agree that we may have two faulty apps, in which case I can fix ours, but I don't hold out much hope for Netscape being fixed. I might plea for a leniency option for legacy apps. since Netscape is our main site unix browser.

I'll write a small Motif test case (scrape... haul... now which of these boxes has the X11 manuals..)

> > However the fault is not present in Mozilla 0.9.6 .

(aside: the Mozilla menu has a different look: possibly is a different widget)

-- 

Regards,  Mark.

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 28 Nov 2001 12:54:27 +0100

On Wed, Nov 28, 2001 at 09:58:47AM +0000, Mark Rainford wrote:
> I agree that we may have two faulty apps, in which case I can
> fix ours, but I don't hold out much hope for Netscape being fixed.
> I might plea for a leniency option for legacy apps. since Netscape
> is our main site unix browser.

Yes, I don't have a problem making hacks in fvwm to work with
broken applications.  Actually, the code is already full of such
hacks.  But to make a patch in the first place it would be helpful
to actually find the problem ;-)

Might it have something to do with the netscape configuration?

Bye

Dominik ^_^  ^_^