Subject: *FvwmIconMan: TitleColorset doesn't work

From: tim phipps <[email-masked]>
Date: Mon, 11 Mar 2002 16:34:02 +0000

Configuration Information [Automatically generated, do not change]:
uname: SunOS silver 5.5.1 Generic_103640-39 sun4u sparc SUNW,Ultra-5_10
compiler flags: gcc -g -O2 -Wall -Wno-implicit-int

FVWM Version:	2.5.1
FVWM_MODULEDIR:	/u/phippst/sunos/libexec/fvwm/2.5.1
FVWM_DATADIR:	/u/phippst/sunos/share/fvwm
FVWM_USERDIR:	/u/phippst/.fvwm

Description:
	An empty FvwmIconMan displays a button with the Title string in it
	but it doesn't use the TitleColorset properly, it seems to just
	draw a flat button using the colorset background, shadow and hilight
	colors. If the colorset has a pixmap it is ignored.

--
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: Mon, 11 Mar 2002 20:13:19 +0100

> 	colors. If the colorset has a pixmap it is ignored.

Tim, can you please try to fix that and have a look at the looping
too?  I'm too busy with the frame layout changes for the next days
or even weeks.

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]

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 11 Mar 2002 20:13:19 +0100

Bye

Dominik ^_^  ^_^

---

From: Tim Phipps <[email-masked]>
Date: Wed, 13 Mar 2002 16:04:26 +0000

> too?  I'm too busy with the frame layout changes for the next days
OK, I'll have a go.

Cheers,
Tim.

---

From: tim phipps <[email-masked]>
Date: Fri, 15 Mar 2002 11:06:40 +0000

> >>      colors. If the colorset has a pixmap it is ignored.

The problem really is that tranparent colrosets don't work in the title
button, here's a patch.

Cheers,
Tim.

Index: modules/FvwmIconMan/xmanager.c
===================================================================
RCS file: /u/phippst/share/cvsroot/fvwm/modules/FvwmIconMan/xmanager.c,v
retrieving revision 1.11
diff -u -r1.11 xmanager.c
--- modules/FvwmIconMan/xmanager.c	2002/03/13 13:43:00	1.11
+++ modules/FvwmIconMan/xmanager.c	2002/03/15 10:17:47
@@ -1488,22 +1488,27 @@
   clear_empty_region (man);
   get_title_geometry (man, &g);
 
-  if (len > 0)
-    XFillRectangle (theDisplay, man->theWindow, man->backContext[state],
-                    g.button_x, g.button_y, g.button_w, g.button_h);
+  if (len > 0) {
+    if (man->colorsets[state] >= 0
+        && Colorset[man->colorsets[state]].pixmap == ParentRelative) {
+      XClearArea (theDisplay, man->theWindow, g.button_x, g.button_y,
+                  g.button_w, g.button_h, False);
+    } else {
+      XFillRectangle (theDisplay, man->theWindow, man->backContext[state],
+                      g.button_x, g.button_y, g.button_w, g.button_h);
+    }
+  }
   if (Pdepth > 2) {
     get_gcs (man, state, 0, &context1, &context2);
     draw_relief (man, state, &g, context1, context2);
   }
-  else {
-  }
   ClipRectangle (man, state, g.text_x, g.text_y, g.text_w, g.text_h);
-  FwinString->str =  man->titlename;
+  FwinString->str = man->titlename;
   FwinString->win = man->theWindow;
   FwinString->gc = man->hiContext[state];
   FwinString->x = g.text_x;
   FwinString->y = g.text_base;
-  FlocaleDrawString(theDisplay, man->FButtonFont, FwinString, 0);
+  FlocaleDrawString (theDisplay, man->FButtonFont, FwinString, 0);
   XSetClipMask (theDisplay, man->hiContext[state], None);
 }

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 15 Mar 2002 13:53:18 +0100

> The problem really is that tranparent colrosets don't work in the title

I'll apply the patch.  Is this 2.5.0 only or should it be changed in
2.4.7 too?

BTW, any ideas about the 'looping' problem?  I don't see that
here.

Bye

Dominik ^_^  ^_^

---

From: Tim Phipps <[email-masked]>
Date: Fri, 15 Mar 2002 14:22:29 +0000

> I'll apply the patch.  Is this 2.5.0 only or should it be changed in
I guess so, I can't check cvs easily but if 2.4.7 has transparent 
colorset support in FvwmIconMan it probably has the same bug and fix.

Cheers,
Tim.

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 16 Mar 2002 15:21:14 +0100

On Fri, Mar 15, 2002 at 02:22:29PM +0000, Tim Phipps wrote:
> I guess so, I can't check cvs easily

The stable branch doesn't change much.  You can check with the
2.4.6 tarball.

> but if 2.4.7 has transparent 

I don't know.  Olivier has done some work for transparency, but I
don't know if this is related.

Bye

Dominik ^_^  ^_^