Subject: Notification: incoming/715

From: [email-masked]
Date: Thu, 24 May 2001 02:05:34 -0500

FVWM Bug Tracking notification

new message incoming/715

Message summary for PR#715
	From: [email-masked]
	Subject: FvwmWharf does not update on colorset update
	Date: Thu, 24 May 2001 02:05:33 -0500
	0 replies 	0 followups

====> ORIGINAL MESSAGE FOLLOWS <====

>From [email-masked] Thu May 24 02:05:34 2001
From: [email-masked]
To: [email-masked]
Subject: FvwmWharf does not update on colorset update
Date: Thu, 24 May 2001 02:05:33 -0500

Full_Name: An Thi-Nguyen Le
Version: CVS
CVS_Date: May 24th
OS: Linux (2.2)
X_Server: XFree86 4.0.3
Submission from: (NULL) (128.174.0.218)

The FvwmWharf Module doesn't appear to update itself when its 
colorset is changed; moving a window over the module will cause 
it to repaint itself correctly on areas covered/uncovered by the 
window.

--
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: Sun, 27 May 2001 20:13:37 +0200

> it to repaint itself correctly on areas covered/uncovered by the 

I can't confirm this.  FvwmWharf updates as it should for me.
Please provide your config file and detailed instructions to
reproduce the problem.

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: An Thi-Nguyen Le <[email-masked]>
Date: Sun, 27 May 2001 13:31:44 -0500

[Dominik Vogt - Sun, 27 May 2001 01:13:56 PM CDT]
> Please provide your config file and detailed instructions to

Okay.  Here's my configuration for FvwmWharf:

*FvwmWharfColorset 8
*FvwmWharfColumns 1
*FvwmWharfGeometry -0+0
*FvwmWharf clock clock.xpm MaxSwallow "wmCalClock" \
                            wmCalClock -comicsans -l -e "xipacsum -t today"
*FvwmWharf bubble bubble.xpm MaxSwallow "wmbubble" \
                            wmbubble -k "rxvt -e top" \
                                        "rxvt -rv -T ROOT -n ROOT -e su"
*FvwmWharf info info.xpm MaxSwallow "wmgtemp" wmgtemp -u 15 -M 45
*FvwmWharf fsm fsm.xpm MaxSwallow "wmfsm" wmfsm
*FvwmWharf web web.xpm MaxSwallow "wmnetselect" \
                            wmnetselect -exec $HOME/software/mozilla/mozilla
*FvwmWharf net net.xpm MaxSwallow "wmnet" \
                            wmnet -n -e "xnetstat -atu" \
                                  -d 500000 -l -x 10000000
*FvwmWharf mail mail.xpm MaxSwallow "wmbiff" wmbiff
*FvwmWharf mail2 mail.xpm MaxSwallow "wmbiff1" wmbiff1 -c $HOME/.wmbiffrc-1
*FvwmWharf weather sun.xpm MaxSwallow "wmWeather" wmWeather -s KCMI -W
*FvwmWharf map map.xpm MaxSwallow "wmGrabImage" \
    wmGrabImage -url http://www.atmos.uiuc.edu/weather/parser.php?/download/rada
r/nicerad_N.gif \
        -delay 600 -http http://www.atmos.uiuc.edu/weather/ -c
*FvwmWharf music music.xpm MaxSwallow "wmusic" wmusic -t -u -x -w

None of the *.xpm's exist.  (Hmmm.  Is that the problem, I wonder?)  There 
are no folders, only swallowed apps.

Anyways, the instructions are rather short and I'm not sure what else 
to add to them:

1. Define colorset 8 to be something.

    *FvwmColorset 8 fg blue, bg black, Pixmap

2. Start up FvwmWharf like normal.  

    Module FvwmWharf
    
   This may or may not completely update itself; in my experience, on a
   restart of the fvwm session it doesn't, while starting it up in the
   middle of a session does.  Sometimes.

3. Change colorset 8 to something different.

    *FvwmColorset 8 fg red, bg white, Pixmap
   
   Anything else with colorset 8 will change appropriately, while FvwmWharf 
   merely sits there.  This happens on both plain colorsets and colorsets 
   with pixmaps/gradients.

   However, forcing expose events on FvwmWharf (iconifying and uniconifying, 
   covering with windows and then removing them) will redraw the expose'd 
   portions of the Wharf correctly.

The patch I submitted fixes this problem (on my machine, anyways)
by calling XClearArea and telling it to generate an Expose event.
(Before, no expose events were being generated on changing colorsets).
I also commented out the many calls to XClearWindow/XClearArea (before,
XClearWindow was called for every folder/button) in that function,
but maybe these are needed for folders that pop out.

I looked at other modules (like FvwmPager) and apparently they do generate 
Expose events in such a way, sometimes, when colorsets get changed.

-- 
An Thi-Nguyen Le
|The longer the title, the less important the job.

---

From: An Thi-Nguyen Le <[email-masked]>
Date: Sun, 27 May 2001 13:34:28 -0500

[An Thi-Nguyen Le - Sun, 27 May 2001 01:32:43 PM CDT]
>     *FvwmColorset 8 fg blue, bg black, Pixmap
<snip>
>     *FvwmColorset 8 fg red, bg white, Pixmap

This even happens when I get the commands correct.  :)

     *FvwmThemeColorset 8 fg blue, bg black, Pixmap
     *FvwmThemeColorset 8 fg red, bg white, Pixmap

-- 
An Thi-Nguyen Le
|Time goes, you say?
|Ah no!
|Time stays, *we* go.
|		-- Austin Dobson

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 27 May 2001 22:03:16 +0200

>      *FvwmThemeColorset 8 fg red, bg white, Pixmap

Neither command is correct ;-)  FvwmTheme does not use new

  *FvwmTheme...

config lines after it has already started.  The correct syntax is

  SendToModule FvwmTheme Colorset ...

Anyway, with this config I was able to reproduce and fix the
problem.  I guess the patch you sent worked also (I did not try),
but it would have caused a redraw for every colour set packet,
even if FvwmWharf did not use that specific colour set.  Well,
FvwmWharf *did* redraw its folders for each packet, but that is a
different story.  Actually, the two lines

  XClearWindow(dpy, main_win);
  RedrawWindow(&main_win,0, -1, num_rows, num_columns);

in change_colorset() somehow went into the loop

  for (x = 0; x < num_folders; x++)
  {
    ...
    XClearWindow(dpy, main_win);
    RedrawWindow(&main_win,0, -1, num_rows, num_columns);
  }

which was meant to redraw the folders.  So, if the wharf had no
folders, the main window was never redrawn.  If it had folders it
was redrawn once for each folder.  The simple fix is to move these
lines out of the loop.  I'll commit that in a moment.

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 29 May 2001 01:29:20 +0000

>   SendToModule FvwmTheme Colorset ...

Actually both syntaxes (module configuration and sending a message) work
the same, i.e. fvwm and FvwmTheme are synchronized until FvwmTheme
reevaluates the new colorset value.
(Propogation of the new value to modules is not synchronized I guess.)

And the first syntax is even preferable in most of situations, because
after restarting (killing/starting) of FvwmTheme the current value is used.

Regards,
Mikhael.