Subject: FVWM: Menu side pixmaps not getting alpha-blended

From: Grzegorz Nieweglowski <[email-masked]>
Date: Fri, 11 Oct 2002 20:51:32 +0200

I've recently started using .png images to get those smooth anti-aliased
image effects, and whilst it works perfectly for titlebar buttons, menu
icons etc., it does absolutely nothing concerning menu side pixmaps. 

I'm using fvwm release 2.5.3.

I've tried both the "direct" approach (using "@picture.png@" in menu title
definitions), and the SidePic option of the MenuStyle command. Both of
them work identically - the image is shown, but it doesn't get
antialiased, and it seems that the side image is getting only a 1 bit
deep alpha channel. And all those nice .png images look as if they were
plain .xpm :(

So, am I doing something wrong? Or is it that png alpha-blending hasn't
yet been fully implemented in menu side pics?

-- 
\hoppke
(Grzegorz Nieweglowski)
--
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: Olivier Chapuis <[email-masked]>
Date: Fri, 11 Oct 2002 23:03:10 +0200

> yet been fully implemented in menu side pics?

This is fixed in the current cvs and so in the next alpha release: 2.5.4.
Regards, Olivier

---

From: Grzegorz Nieweglowski <[email-masked]>
Date: Sat, 12 Oct 2002 10:13:47 +0200

Day: 10/12/02. Olivier Chapuis wrote the following:

>> So, am I doing something wrong? Or is it that png alpha-blending
>> hasn't yet been fully implemented in menu side pics?
>>
> 

Thanks for the info, that's one more reason for me to start using the
CVS version.

BTW, there's another thing that puzzles me - is there a way to assign
"Style" attributes to a single, perhaps not-quite-so-unique window?

I often have a couple (or so) xterms opened, which as far as I can tell
have all identical atributes (Class/Name/Title etc.)

I would hovewer find it usefull to have a keybinding that, say, turns
the active windows "FixedPosition" state on. But the Style command
accepts only name, class or resource strings, and with multiple xterms
those strings are shared among all of those little pests. I know that
I can force an xterm to change it's title to something unique, either
with a command line/X resource option, or with an escape sequence at
run-time, but that really isn't a solution. For a moment I thought that
"Style xterm IndexedWindowName" could come usefull here, but it only
changes the appearance of the titlebar, and so it does not influence the
"Style" command... If only Style would support "$w" (WindowID)...

Am I asking for the impossible, or have I just overlooked something
obvious?

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 12 Oct 2002 16:50:17 +0000

> "Style" attributes to a single, perhaps not-quite-so-unique window?

Please start a separate thread with a relevant subject when asking new
questions. When you get dozens of messages daily, it helps a lot.

> Am I asking for the impossible, or have I just overlooked something

If something is only configurable using Style and you don't use the
unique id string, this is not possible yet. But setting Style on per
window basis (and not just on per id basis as it is now) is on to-do list.

Practically, it is often solvable without such functionality.
Just start all special xterms with -name YourUniqueId option (-n and -T
may work too) and configure Style YourUniqueId.

But of course, this is a statical solution, you ask for a dynamical one.
You may change the window name and icon name of xterm dynamically using:

  printf "\033]1;MyNewIconTitleName\007"
  printf "\033]2;MyNewWindowTitleName\007"

Then you should issue RecaptureWindow to reapply all Style settings to
xterm, or reissue the relevant Style commands with MyNewWindowTitleName.
Of course, only window-name affects Style, not icon-name.

You may force only unique window names using IndexedWindowName, like you
mentioned, but it's just the visible name that becomes unique, it is not
used in Style. So, this can't be used to apply dynamical Style changes.

Regards,
Mikhael.

---

From: Grzegorz Nieweglowski <[email-masked]>
Date: Sun, 13 Oct 2002 09:56:04 +0200

> questions. When you get dozens of messages daily, it helps a lot.

OK. Sorry for the inconvenience, folks :)

> > I know that I can force an xterm to change it's title to something
> > unique, either with a command line/X resource option, or with an
> > escape sequence at run-time, but that really isn't a solution.
> > (...)
> 

I guess it will be working perfectly around fvwm-3.0 ;)

The best window matching I've seen so far is implemented is Sawfish
- especially the possibility to combine several "categories" (Class,
Name, Title, process name, locale etc.) into a single pattern, and all
of that buffed with additional regexp-ing.

The current window-matching part of the "Style" command just doesn't
seem to fit such a flexible and powerfull WM that FVWM evolved to be.

> Practically, it is often solvable without such functionality.  Just
> start all special xterms with -name YourUniqueId option (-n and -T may
> work too) and configure Style YourUniqueId.
> 
> But of course, this is a statical solution, you ask for a dynamical
> one.  You may change the window name and icon name of xterm
> dynamically using:
> 

But this, on the other hand, requires me to have a CLI active in that
xterm.  And this is quite inconvenient, if not impossible, when running
some programmes, like eg. slrn.

Besides, those techniques were already known to me :) I even mentioned
them in the original mesage (X resource/command line option/escape
sequences).

There is a third possibility. It's not perfect, but works (mostly) for
me. I usually start my xterms via a Meta-x keystroke, so I can create
a wrapper around the xterm binary. A simple shell (or perl) script, that
automatically changes the "name" property of the xterm, by, let's say,
appending a unique two-letter code to the property and then running an
xterm with this modified command line. The script would only have to
remember the last used combination, and increase the "counter" every
time an xterm is run. Deallocating ID's left behind by terminated xterms
is irrelevant, although possible. This approach is trivial to code in
perl, a bit harder in pure shell, but the "pure shell" method would
cause less overhead. If coded as a fvwm-perl-module, it would work very
fast (no need to start a perl interpreter every time a "run xterm"
request is issued), and could automatically deallocate unused ID's and
styles.

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 13 Oct 2002 10:50:43 +0200

> may work too) and configure Style YourUniqueId.

You can also set xterm's class with "xterm -class foobar".  This
way you won't see the mangled string in the window title.

> You may change the window name and icon name of xterm dynamically using:

[snip]

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: Gregg Dameron <[email-masked]>
Date: Mon, 14 Oct 2002 12:05:54 -0600

> way you won't see the mangled string in the window title.

FYI - the "-class" option of xterm is not implemented universally.  Not
supported on Solaris 7 and 8, for example.

Gregg Dameron