Subject: FVWM: problem with 'unclutter' utility

From: Joseph Manning <[email-masked]>
Date: Tue, 12 Sep 2000 18:16:11 +0100 (IST)

Hello,

   I'm running FVWM-2.3.22 under RedHat Linux 6.0.

   I'm also running the nice little 'unclutter' utility:

      http://rpmfind.net/linux/RPM/contrib/libc6/i386/unclutter-0.8-4.i386.html

   which makes the cursor vanish after a short period of inactivity.

   However, 'fvwm' and 'unclutter' have a small problem interacting with
   one another --- if the cursor is on the side border of a window,
   and 'unclutter' has made it vanish, then pressing a key which has
   a 'Key' binding does not actually invoke that binding; instead,
   it just echoes that key into the window.

   For example, with the binding:

      Key  m  FSTW  M  Maximize 100 100

   pressing Alt-m when the cursor is on the side border and has vanished
   simply causes the letter 'm' to be typed in the window, rather than
   resulting in the window being maximized.  If Alt-m is pressed before
   the cursor has vanished, then the window is indeed maximized.

   The problem remains even when 'Key' is changed to 'PointerKey',
   and under both 'MouseFocus' and 'SloppyFocus'.

   Even after the cursor vanishes, the given window STILL RETAINS FOCUS;
   its borders are still highlighted, and the keys which are pressed
   are echoed into it.

   I do not know if the problem lies with 'unclutter' or with 'fvwm'.
   I read through the 'unclutter' source code, but I know very little
   about the details of X-windows programming, so I could not spot anything.

   Finally (!) my questions: has anyone else come across this problem,
   and does anyone have a work-around to it?

   If the window still has focus, should it not correctly process the key?

   Thanks for listening!

Cheers, Joseph
   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Joseph Manning / Computer Science / University College Cork / [email-masked]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

---

From: Brad Giaccio <[email-masked]>
Date: Tue, 12 Sep 2000 21:21:21 -0400

Well, what you are witnessing is an artifact of how X manages cursors.
When you have a cursor what you have is a square either 32x32 or 64x64
depending on your Xserver.  When you define some graphic to be your
cursor in the bitmap you define a hotspot.  That is to say given this
large square moving about the screen X events are looking for a single
pixel as the cursor location and that is the hotspot.  What unclutter
does is replaces your cursor with a masked square and for good or bad it
uses the upper left I believe as the hotspot (the default).

So if your cursor is on the edge of a window and then morphs to a square
your cursor position may change as far as X is consered.  So whether
this is a bug or not and where it is entirelly up to your desires and
to an extent your fvwm focus policy.  I'm a sloppy focus kind of guy,
and have happily used unclutter for going on 4yrs yes I just checked my
binary mod time and it has been 4yrs.  The proper fix would be to get
the current hotspot just before masking your cursor and then placing the
hotspot in the same place in the "invisible cursor".  Of course this fix
would go in unclutter and since I haven't seen and update in ages nor do
I recall who wrote it my suggestion would be to find someone motivated
to fix it.  Or to use this as an opportunity to learn some X code.

Brad

-- 
--- There are two kinds of knowledge, you either know the answer or
			you know where to find it
		      -Kane, Johnson, and anonymous
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Erik Steffl <[email-masked]>
Date: Wed, 13 Sep 2000 08:42:52 -0700

this does not seem to address the problem he's having - the window
still has focus and in fact gets the keyboard events, it's just that
fvwm does not process them (the ones that are defined as shortcuts). it
does not look like there is a problem of a 'moved pointer'.

	erik

---

From: Erik Steffl <[email-masked]>
Date: Wed, 13 Sep 2000 08:42:52 -0700

erik

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 13 Sep 2000 23:46:54 +0200

> does not look like there is a problem of a 'moved pointer'.

I think it *does* explain the behaviour.  If the hotspot is moved
into the client portion of the window or if the hotspot moves into
thze root window (with SloppyFocus only), all further keypresses
go directly to the client window, not to the borders.

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" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 13 Sep 2000 23:46:54 +0200

Bye

Dominik ^_^  ^_^

---

From: Erik Steffl <[email-masked]>
Date: Wed, 13 Sep 2000 16:24:03 -0700

I don't remember exact definition of the shortcut, but with the
following one:

Key F9    A    M    Iconify

  it works no matter where exactly the pointer is, as long as the window
has focus... it would explain the behaviour if the shortcut was specific
to border (or title) only. perhaps that is the case in this specific
case (pun sort of intentional:-).

	erik

---

From: Erik Steffl <[email-masked]>
Date: Wed, 13 Sep 2000 16:24:03 -0700

Key F9    A    M    Iconify

	erik

---

From: Joseph Manning <[email-masked]>
Date: Thu, 14 Sep 2000 11:15:54 +0100 (IST)

On 2000-Sep-13, Dominik Vogt wrote:

>> the root window (with SloppyFocus only), all further keypresses

Dominik,

   Ah, but the problem still arises under 'MouseFocus'.

   My current guess at what's happening is that the cursor hotspot
   has indeed left the application window, but because of the way
   in which 'unclutter' caused this to happen, fvwm has not noticed
   that the focus has changed, since there has been no explicit movement
   of the mouse.

   How does that sound?  I'm only guessing.

Cheers, Joseph