Subject: Re: FVWM: Clicking through shaped icons to desktop

From: Steve Talley <[email-masked]>
Date: Thu, 15 Aug 2002 17:48:41 -0600

I didn't get any response to this on the FVWM user's list, so I
thought I'd try the devel list.

Thanks,

Steve

Steve Talley wrote:

> Hello,
>
> I've been using shaped desktop icons which look very spiffy but
> present a frequent problem.  When I go to click on an icon, about
> half the time (depending on the icon) I end up clicking on a
> transparent part of the icon, which gets passed through to the
> desktop.  The result is that the root menu pops up instead of the
> intended deiconification.
>
> This behavior differs from some other window managers (and M$
> Windows) where clicking within the bounds of the icon, even on
> transparent portions of the icon, results in a click on the icon
> itself.  This looks just as nice and makes for a less error-prone
> experience.
>
> Is there some easy config fix for this in FVWM that I've missed in
> the man page?  I know I could just not use shaped icons, or use more
> dense icons, but that would detract from the spiffiness.
>
> Barring a configuration fix, has anyone given any thought to how
> this could be implemented in FVWM?  My knowledge of the X Shape
> extension is limited but I don't believe that it allows you to catch
> clicks passed to transparent portions of the window.  Technically,
> there is no transparent part of the window (I think).  Am I wrong?
>
> One thought I had would be to implement an non-shaped InputOnly
> window over the shaped pixmap icon window.  Then map/move/resize it
> along with the pixmap icon window.  But looking through the code
> this would seem to be a big change.
>
> Any other suggestions?
>
> Thanks,
>
> Steve

--
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: Dan Espen <[email-masked]>
Date: Thu, 15 Aug 2002 20:12:16 -0400

> thought I'd try the devel list.

Hmm, looks like this slipped thru the cracks.

> > clicks passed to transparent portions of the window.  Technically,

I think you are correct.

> > this would seem to be a big change.

I believe any additional window would have to have content, Ie.
pixels set to some value, so unless the icon attempted to pick up
the pixels of whatever was under it, it wouldn't be transparent.

Perhaps you could name some other window manager that does things
differently (other than windows) so we could take a look.

We have had requests to supply a frame around the shaped icons
like mwm does it.  A patch would probably be accepted.

-- 
Dan Espen                           E-mail: [email-masked]
444 Hoes Lane  Room RRC 1C-214      Phone: (732) 699-5570
Piscataway, NJ 08854
--
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: "S. Anderson" <[email-masked]>
Date: Thu, 15 Aug 2002 19:34:53 -0600

> > > intended deiconification.

Just thought I would mention, if you use png images for your Icons,
clicking on the transparent part will do what you want.

sa

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 16 Aug 2002 10:43:28 +0200

> clicking on the transparent part will do what you want.

Um, really?  But we haven't implemented anything like this in
fvwm.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [email-masked], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
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: "S. Anderson" <[email-masked]>
Date: Fri, 16 Aug 2002 07:58:05 -0600

> Um, really?  But we haven't implemented anything like this in

hmm, mabey the transparent part of my icon isn't completely transparent
then. It is here if you want to look at it.
http://www.xmission.com/~sa/terminal.png

sa

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 16 Aug 2002 16:03:59 +0200

> http://www.xmission.com/~sa/terminal.png

Teehee, funny!  PNGs work with the ParentRelative attribute to
implement transparency.  Have you tried to drag a PNG icon across
a window?

Olivier, is that a feature of the PNG lib or did you write this?

Bye

Dominik ^_^  ^_^

---

From: Dan Espen <[email-masked]>
Date: Fri, 16 Aug 2002 10:14:59 -0400

> http://www.xmission.com/~sa/terminal.png

For me, clicking on the transparent parts is like clicking on
the root.

I'm running current FVWM CVS, Mandrake 8.1 with
XFree 3.3.6 and an S3 Savage video card.

I'm not using icontitles.

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 16 Aug 2002 16:35:33 +0200

> XFree 3.3.6 and an S3 Savage video card.

Do you have XRender support?  I think that's necessary for the PNG
alpha channel.  I'm not sure if this influences if the icon is
shaped or not.

Bye

Dominik ^_^  ^_^

---

From: Dan Espen <[email-masked]>
Date: Fri, 16 Aug 2002 10:45:58 -0400

Dominik Vogt <[email-masked]> writes:
> > > > > > > > present a frequent problem.  When I go to click on an icon,
> > > > > > > > about half the time (depending on the icon) I end up
> > > > > > > > clicking on a transparent part of the icon,
> > > > > > > > which gets passed through to the desktop.
> > > > > > > >  The result is that the root menu pops up instead of the

Nope, no XRender.

The icon is shaped.

---

From: Steve Talley <[email-masked]>
Date: Fri, 16 Aug 2002 12:33:29 -0600

Dan Espen wrote:

> > > > > > I didn't get any response to this on the FVWM user's list,
> > > > > > so I thought I'd try the devel list.
> > > > >
> > > > > > > I've been using shaped desktop icons which look very
> > > > > > > spiffy but present a frequent problem.  When I go to
> > > > > > > click on an icon, about half the time (depending on the
> > > > > > > icon) I end up clicking on a transparent part of the
> > > > > > > icon, which gets passed through to the desktop.  The
> > > > > > > result is that the root menu pops up instead of the
> > > > Just thought I would mention, if you use png images for your
> > > > Icons, clicking on the transparent part will do what you want.
> > >
> > hmm, mabey the transparent part of my icon isn't completely
> > transparent then. It is here if you want to look at it.
> For me, clicking on the transparent parts is like clicking on the
> root.
>
> I'm running current FVWM CVS, Mandrake 8.1 with XFree 3.3.6 and an
> S3 Savage video card.

I get the same behavior.  Clicking on the transparent portion of a png
or xpm icon image still clicks through to the root window.

FVWM version 2.5.2 compiled on Solaris 8 with support for: XPM, PNG,
GNOME WM hints, EWMH hints, Shape, SM

Steve

---

From: Olivier Chapuis <[email-masked]>
Date: Fri, 30 Aug 2002 08:19:34 +0200

> Olivier, is that a feature of the PNG lib or did you write this?

No, I have implemented this. Of course the solution is not perfect.  I
was award of the problem you point out: icon with alpha over a window
(there are also small pbs with background change if you do not use an
Esetroot or fvwm-root compatible programs).

The only other solution I see is to implement two new style
IconBackgroundColorset and HilightIconBackgroundColorset, plus a style
to control the size of the background and the relief. It is on my todo
list, but if one want to do it there is no problems :o)

Olivier

---

From: Olivier Chapuis <[email-masked]>
Date: Fri, 30 Aug 2002 08:22:21 +0200

> alpha channel.  I'm not sure if this influences if the icon is

Now I hope that alpha blending works even without XRender support.

Olivier

---

From: Olivier Chapuis <[email-masked]>
Date: Fri, 30 Aug 2002 10:19:01 +0200

> Esetroot or fvwm-root compatible programs).

Or maybe we should use the icon title bg color as bg for alpha blend
rendering. But, using ParentalRelativity seems to me more consistent
with the rendering of an icon with a mask and no alpha. In both case
an icon with some alpha over a window will look strange.

Olivier