Subject: Nautilus<->Fvwm interaction

From: Tomas Ogren <[email-masked]>
Date: Wed, 9 May 2001 18:41:11 +0200

Hello.

If you use fvwm2 and run Nautilus, bad focus stuff happens.. You won't
get any keyboard focus in the Nautilus window for instance. The Nautilus
people says it's an fvwm bug.. If anyone with knowledge of WM hints and
focus stuff could look at http://bugzilla.eazel.com/show_bug.cgi?id=8273
it would be great..

/Tomas
-- 
Tomas Ögren, [email-masked], http://www.ing.umu.se/~stric/
|- Student at Computing Science, University of Umeå
`- Sysadmin at {cs,ing,acc}.umu.se
--
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: Michael Han <[email-masked]>
Date: Wed, 9 May 2001 20:25:53 -0700

> focus stuff could look at http://bugzilla.eazel.com/show_bug.cgi?id=8273

It sounds like the Nautilus developers have chosen to follow the
OpenLook model of focus management. That model is, IMO, just plain
broken. You might be able to improve the situation by using:

Style * Lenience

and maybe some other settings that I no longer recall. There was a
thread about this a while back -- I think Dominik came in with a
fairly final assessment.
-- 
[email-masked]                            http://www.mikehan.com/
coffee achiever                              San Francisco, California
"Notice how I blame my own mistakes on the lack of rules?" - Dan Espen 
--
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: "Paul D. Smith" <[email-masked]>
Date: 10 May 2001 00:20:10 -0400

I read the bug referenced in the URL, and also the bugs that _that_ bug
references, etc.

It seems pretty clear that the Nautilus guy is a reasonable fellow, and
he wants to do the right thing, but it also seems clear that he feels
the ICCCM "blesses" the behavior he's using.

As I understand it, he's trying to allow for drag'n'drop without
focusing the originating window (that is, if you have a window without
focus and you move the mouse over it (click to focus obviously) and
click and drag something out of the window somewhere else, he _doesn't_
want that window to get focus in that case.

Since no WM will do that "normally", he wants to do his own focusing
rather than let the WM do it.  Personally I think that's a hell of a lot
of extra work for a relatively minor feature, but there you go.

He believes that the ICCCM allows that if you mark your window as
WM_TAKE_FOCUS, then even if it's marked as not accepting input the WM
should still send it a focus event.  Then the code will assert focus, if
appropriate.

Here's a relevant passage from [email-masked] in the response to bug
#7823:

  http://bugzilla.eazel.com/show_bug.cgi?id=7823

  My reading of the ICCCM is that if WM_HINTS.input is false, but
  WM_PROTOCOLS includes WM_TAKE_FOCUS, then the window manager should
  never focus the window itself - it should just send the window a
  WM_TAKE_FOCUS message

If that's not the right way to interpret this combination (or anyway we
don't _think_ it's the right way :), I think it would be good if folks
here who understand the issues had a conversation with him explaining
our interpretation, etc.

If there is no meeting of the minds, so be it: we can add a note to the
FAQ and/or some special new BugOpt for Nautilus, if that's reasonable,
but at least everyone will understand everyone else's position.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>    HASMAT--HA Software Methods & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
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: Michael Han <[email-masked]>
Date: Wed, 9 May 2001 22:43:10 -0700

>   never focus the window itself - it should just send the window a

Hmm, my reading of ICCCM2 (finally took the time to find it) 4.1.7
agrees with their assessment.

http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.7

He's describing what ICCCM2 defines as "Globally Active" Input Model.
Ick, but if that's what they want...
-- 
[email-masked]                            http://www.mikehan.com/
coffee achiever                              San Francisco, California
Why do we still live here in this repulsive town? All our friends are
in New York." Stephen Merritt
--
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: Thu, 10 May 2001 12:42:58 +0200

> Ick, but if that's what they want...

Yes, he's right.  Fvwm does not handle the "Globally Active" input
model correctly.

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: Dominik Vogt <[email-masked]>
Date: Thu, 10 May 2001 12:48:02 +0200

> focus stuff could look at http://bugzilla.eazel.com/show_bug.cgi?id=8273

I made a patch, but I can't test this.  If the patch works you may
report this to the Nautilus people so that they can add a hint to
their bug database.

Bye

Dominik ^_^  ^_^

---

From: Tomas Ogren <[email-masked]>
Date: Fri, 11 May 2001 04:00:02 +0200

> report this to the Nautilus people so that they can add a hint to

 if (Fw && !IS_LENIENT(Fw) &&
     Fw->wmhints && (Fw->wmhints->flags & InputHint) && !Fw->wmhints->input &&
     (sf = get_focus_window()) && sf->Desk == Scr.CurrentDesk)

sf here "always" becomes null (i haven't seen it become anything else),
so the region you patched is "never" affected. If I add that
g_f_w()==NULL is ok, it becomes slightly better.. I mostly get focus..
but I can lose focus while moving the mouse within the window etc.. very
weird stuff.. It is alsy very laggy.. If I move the mouse in and out of
the window, it gets focus very randomly and can leave it in the wrong
state (nautilus having focus when I'm outside etc).

If I do 'Style * Lenience' it works perfectly.

I've checked the source for twm (from xf86/4.0.3) and it has some simple
stuff in there...

		if (Tmp_win->title_w && Scr->TitleFocus &&      /* 4 */
		    Tmp_win->wmhints && Tmp_win->wmhints->input)
		  SetFocus (Tmp_win, ewp->time);
		if (Scr->NoTitlebar && Scr->TitleFocus &&       /*4a */
		    Tmp_win->wmhints && Tmp_win->wmhints->input)
		  SetFocus (Tmp_win, ewp->time);
		if (Tmp_win->protocols & DoesWmTakeFocus)       /* 5 */
		  SendTakeFocusMessage (Tmp_win, ewp->time);
		Scr->Focus = Tmp_win;

And with twm it works perfectly too...

Also tested: sawfish and enlightenment with perfect results
blackbox - no input focus but it raises the window when the cursor is
inside the window...

/Tomas - confused and with lacking knowledge of ICCCM/focus stuff

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 11 May 2001 13:27:26 +0200

> state (nautilus having focus when I'm outside etc).

I made another patch.

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]