Subject: Transparent decoration screenshot

From: Mikhael Goikhman <[email-masked]>
Date: Fri, 22 Nov 2002 22:37:37 +0000

Take a look at this screenshot (1Mb, sorry):

  http://fvwm.sourceforge.net/tmp/migo-desktop-20021122.png

I didn't polish it, just a quick hack. Looks nice.

The TitleStyle command (executed once) is slow, probably takes a second
or two, but a window creation and a window moving are surprizingly fast.

I didn't get an idea yet where fg is taken from, probably a bug.

Regards,
Mikhael.
--
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: Olivier Chapuis <[email-masked]>
Date: Sat, 23 Nov 2002 09:26:03 +0100

> or two, but a window creation and a window moving are surprizingly fast.

Can you send me the config.

> I didn't get an idea yet where fg is taken from, probably a bug.

Form Style {Hilight}Colorset. But there is maybe a bug with
Style {Hilight}BorderColorset and Title fg colors. I will
check.

Olivier

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 23 Nov 2002 10:43:44 +0000

> Can you send me the config.

The config is 6 lines in the screenshot itself, should work with any theme
and "fvwm-root -r" background. Together with:

  ButtonStyle All -- UseTitleStyle flat

Actually, I wanted to say that Colorset commands are slow a bit, but it is
ok, since they copy a huge image into memory. With simple backgrounds it
is fast. TitleStyle commands are relatevely fast, but it depends on a
number of windows. I think it should fly with a better CPU/memory/video.

> Style {Hilight}BorderColorset and Title fg colors. I will

Just repeated with the same and other backgrounds, the fg in
{Hilight}Colorset is black, but it is replaced everywhere with white now.
Yesterday it was gray or brown. I don't know.
{Hilight}{Border}Colorset fg is not used, anyway it is not white.

Another problem. Move a window, cancel a movement using the second mouse
button or Escape, the title is restored ok, but not buttons and borders.
They are restored on any focus/unfocus.

I like it very much. As I said the window movement is very fast and it is
almost smooth, but not exactly smooth. Try to move a window horizontally
from left to right or right to left. The image noticeably trembles.
Our perfect opaque Move for statical decorations becomes not perfect for
pseudo transparent ones. I wonder whether it is possible to use some
technique to make it perfectly smooth even it will use more CPU.

Regards,
Mikhael.

---

From: Olivier Chapuis <[email-masked]>
Date: Sun, 24 Nov 2002 07:57:05 +0100

On Sat, Nov 23, 2002 at 10:43:44AM +0000, Mikhael Goikhman wrote:
> ok, since they copy a huge image into memory.

and tinted. Be award that if you do not specify a bg colour then, in
addition the average colour of the image is computed (very slow).

> With simple backgrounds it

Yes all the decorations are redraw.
 
> They are restored on any focus/unfocus.

I will fix these soon. Thanks for testing and point out pbs.

> technique to make it perfectly smooth even it will use more CPU.

Some improvement is possible (and will be done). But I do not think
that it is possible to get smooth opaque move. We should redraw
with pseudo-transparent as we do not redraw at all with static
decoration ...

Olivier

---

From: Olivier Chapuis <[email-masked]>
Date: Mon, 25 Nov 2002 22:00:37 +0100

> {Hilight}{Border}Colorset fg is not used, anyway it is not white.

I am unable to reproduce this one. Can you send a minimal config?
 
> They are restored on any focus/unfocus.

fixed.

Olivier

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 26 Nov 2002 00:02:55 +0000

> I am unable to reproduce this one. Can you send a minimal config?

Please note I didn't update the cvs for your latest commit yet.

It is the same config I mentioned earlier with the first 3 lines added.
Save it in ~/.fvwm/transdecors:

  Colorset 1 fg red   # you may have "bg red" instead, it does not matter
  Style * Colorset 1, HilightColorset 1
  PipeRead 'fvwm-root -r `fvwm-config -d`/themes/metal/images/background/metal-tile.xpm'
  Colorset 41 RootTransparent buffer, tint cyan 15
  Colorset 42 RootTransparent buffer, tint red 15
  BorderStyle Active Colorset 41 -- flat
  BorderStyle Inactive Colorset 42 -- flat
  TitleStyle Active Colorset 41 -- flat
  TitleStyle Inactive Colorset 42 -- flat
  ButtonStyle All -- UseTitleStyle flat

Now start 'fvwm -f transdecors' using another X (don't restart with it!).
Start any number of windows.
I see cyan fg everywhere, not red or black (if you didn't define fg).

Now do "Restart" or "Restart fvwm -f transdecors". It core dumps.

#0  0x0808dbb6 in parse_colorset (n=41, line=0x0) at colorset.c:1105
1105                                                    colors[k++].pixel =
(gdb) where
#0  0x0808dbb6 in parse_colorset (n=41, line=0x0) at colorset.c:1105
#1  0x08070a7c in CMD_Colorset (cond_rc=0xbfffe8fc, exc=0x80dfc70, 
    action=0x80ed311 "41 RootTransparent buffer, tint cyan 15")
    at builtins.c:2698
#2  0x08091836 in __execute_function (cond_rc=0xbfffe8fc, exc=0x80f07f0, 
    action=0x80ed311 "41 RootTransparent buffer, tint cyan 15", 
    exec_flags=0 '\0', args=0x80c5c0c) at functions.c:586
#3  0x080923f3 in execute_function (cond_rc=0x0, exc=0x80f07f0, 
    action=0xbfffe9b0 "Colorset 41 RootTransparent buffer, tint cyan 15", 
    exec_flags=0 '\0') at functions.c:1176
#4  0x080a2e18 in run_command_stream (f=0x80f2690, exc=0x80f07f0) at read.c:161
#5  0x080a2f80 in run_command_file (filename=0x80f08f8 "transdecors", 
    exc=0x80f07f0) at read.c:239
#6  0x080a30d1 in CMD_Read (cond_rc=0xbfffee6c, exc=0x80f07f0, 
    action=0x80f07dd "transdecors") at read.c:302
#7  0x08091836 in __execute_function (cond_rc=0xbfffee6c, exc=0x80f0758, 
    action=0x80f07dd "transdecors", exec_flags=0 '\0', args=0x80c633c)
    at functions.c:586
#8  0x080923f3 in execute_function (cond_rc=0x0, exc=0x80f0758, 
    action=0x80dba20 "Read transdecors", exec_flags=0 '\0') at functions.c:1176
#9  0x0807d7bf in main (argc=4, argv=0xbffff3d4) at fvwm.c:2334
#10 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6

Regards,
Mikhael.

---

From: Olivier Chapuis <[email-masked]>
Date: Tue, 26 Nov 2002 10:06:05 +0100

> Now do "Restart" or "Restart fvwm -f transdecors". It core dumps.

I hope it is fixed now (the core dump).
The E root pixmap is an unprotected shared resource ...

Olivier

---

From: Andre Bonhote <[email-masked]>
Date: Tue, 26 Nov 2002 11:16:02 +0100

Hi

I just saw Mikhail's great transparency thing and tried it with today's
CVS version, and I must say: Cool! :)

But: How can I apply the transparency to my menues? I tried several
things, like

MenuStyle * MenuFace colorset 41   
[FVWM][menustyle_parse_face]: <<ERROR>> unknown style colorset: colorset
41

and 

MenuStyle * MenuFace UseDecor Clean
[FVWM][menustyle_parse_face]: <<ERROR>> unknown style UseDecor: UseDecor
Clean

and so on, but always without success.

Any hint?

TIA

André

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 26 Nov 2002 10:39:01 +0000

> and so on, but always without success.

Ever considered to take a look at the MenuStyle entry in the man page? :)

The syntax is:

  MenuStyle * MenuColorset 5, ActiveColorset 6, GreyedColorset 7

  Colorset 5 RootTransparent, bg .., fg .., Tint ..

In decoration colorsets you seem to need "RootTransparent buffer" instead.
If you have enough memory, I suggest to always use "buffer", this makes
things much faster, in colorset 5 in particular.

Regards,
Mikhael.

---

From: Olivier Chapuis <[email-masked]>
Date: Tue, 26 Nov 2002 11:39:32 +0100

>   Colorset 42 RootTransparent buffer, tint red 15

With a big root pixmap this will be very slow. One thing that slow
down colorset loading is that if you use a pixmap and you do not
specify a bg colour, then bg is set to average by default. I do not
know if this default is good. One thing that we can do is to limit the
number of pixels for the computation of the average colors: just
used at most 76800 pixels of the image. What do you think?

>   ButtonStyle All -- UseTitleStyle flat

I am still unable to reproduce any fg colour pbs.

Olivier

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 26 Nov 2002 13:00:29 +0000

> used at most 76800 pixels of the image. What do you think?

It is not so slow. If we disable the bg average default what will be
the default, gray? I am not against this, but I think "bg average" is ok.
277*277=76800 pixels from the middle of the image? I don't know.

> I am still unable to reproduce any fg colour pbs.

So you correctly get it red (or black)?
With this configuration it is always cyan (rgb:00/ff/ff) for me.
Even icon title fg.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 26 Nov 2002 11:47:41 +0100

> [FVWM][menustyle_parse_face]: <<ERROR>> unknown style colorset: colorset

The options you are looking for is MenuColorset, ActiveColorset
and GreyedColorset.

> [FVWM][menustyle_parse_face]: <<ERROR>> unknown style UseDecor: UseDecor

Decors can not be applied to menus.

> and so on, but always without success.

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 27 Nov 2002 00:30:28 +0000

> The E root pixmap is an unprotected shared resource ...

Yes, seems to be fixed. But now I get another core dump that I didn't.
If I point to any icon title that should be expanded, it core dumps!
Short texts in icon titles are ok, since there is no expanding.

I hope the fact that it started only today/yesturday helps.
I do _not_ use any transparency when this happens or even E root.
Tell me if this info is not enough.

#0  0x08078ffe in DrawIconTitleWindow (fw=0x817f368, pev=0x0, 
    BackColor=8944742, Shadow=0x80dd8f8, Relief=0x80dd880, cs=1) at icons.c:740
740                             x_title_w = fw->icon_g.picture_w_g.x -
(gdb) where
#0  0x08078ffe in DrawIconTitleWindow (fw=0x817f368, pev=0x0, 
    BackColor=8944742, Shadow=0x80dd8f8, Relief=0x80dd880, cs=1) at icons.c:740
#1  0x080797e8 in DrawIconWindow (fw=0x817f368, draw_title=1, draw_pixmap=0, 
    focus_change=0, pev=0x0) at icons.c:1151
#2  0x0806053f in HandleEnterNotify (ea=0xbfffee14) at events.c:1732
#3  0x08062382 in dispatch_event (e=0xbfffee60) at events.c:3202
#4  0x08062431 in HandleEvents () at events.c:3240
#5  0x0807d976 in main (argc=4, argv=0xbffff394) at fvwm.c:2399
#6  0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6

Regards,
Mikhael.

---

From: Olivier Chapuis <[email-masked]>
Date: Thu, 28 Nov 2002 08:29:16 +0100

> With this configuration it is always cyan (rgb:00/ff/ff) for me.

Yes, I should check the fg code.

Olivier

---

From: Olivier Chapuis <[email-masked]>
Date: Thu, 28 Nov 2002 08:27:26 +0100

> Short texts in icon titles are ok, since there is no expanding.

I am unable to reproduce this ...
 
> I hope the fact that it started only today/yesturday helps.

That is just after:

  CVS olicha: * Be more safe with the E root pixmap

?

> Tell me if this info is not enough.

No :o/

Olivier

---

From: Olivier Chapuis <[email-masked]>
Date: Thu, 28 Nov 2002 11:32:59 +0100

> Tell me if this info is not enough.

Can you try again with my last commit? Maybe the fg colours
is fixed?

Olivier

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 28 Nov 2002 12:36:41 +0000

> Can you try again with my last commit? Maybe the fg colours

No, I see no difference.

I can't reproduce core dump now. But this does not mean much.

Here is the history. Yesterday I ran fvwm from yesterday that core dumped
when any title is expanded. X initially exited and I started X again (so it
can't be because of global root pixmap). I did: while true; do fvwm..; done
Since I always use icons, I point to icon titles from my habbits, it core
dumped several times for me, but today it didn't (even without your latest
commit). With this commit I also can't reproduce a core dump now.

Regards,
Mikhael.