Subject: RE: FVWM: New problems since 2.3.6

From: "Adye, TJ (Tim) " <[email-masked]>
Date: Fri, 11 May 2001 03:41:14 +0100

Hi Dan,

Dan Espen <[email-masked]> wrote:
>
> Can you give more detail about what the annoying screen refresh looks
> like?  What parts of the screen are redrawn.
> 
> In modules/FvwmBacker/FvwmBacker.c around line 365, change it to
> look like this:
> 
> void ProcessMessage(unsigned long type, unsigned long *body)
> {
>   char *tline;
> 
>   switch (type)
>   {
>   case M_CONFIG_INFO:
>     tline = (char*)&(body[3]);
>     fprintf(stderr"FvwmBacker: config\n");
>     ExecuteMatchingCommands(ParseConfigLine(tline));
>     break;
> 
>   case M_NEW_DESK:
>     current_desk = body[0];
>     fprintf(stderr"FvwmBacker: new desk\n");
>     ExecuteMatchingCommands(-1);
>     break;
> 
>   case M_NEW_PAGE:
>     current_desk = body[2];
>     current_x = body[0]/MyDisplayWidth;
>     current_y = body[1]/MyDisplayHeight;
>     fprintf(stderr"FvwmBacker: new page\n");
>     ExecuteMatchingCommands(-1);
>     break;
> 
>   }
> }

Aha! FvwmBacker is getting a M_NEW_PAGE whenever I deiconify (or select from
the taskbar or other window manager menu) a window - regardless of whether a
page/desk change has occurred. Eg. here's what I got (with a bit more detail
in the debug output):-

  Reload modules' config:-
    FvwmBacker: config *FvwmBackerCommand (Desk 0, Page * *) -solid \#3F5469
    FvwmBacker: config *FvwmBackerCommand (Desk 1, Page * *) -solid purple4
    FvwmBacker: config *FvwmBackerCommand (Desk 2, Page * *) -solid
DarkOliveGreen4
    FvwmBacker: config *FvwmBackerCommand (Desk 3, Page * *) -solid brown4
  Select window on desk 1 (originally on desk 0):-
    FvwmBacker: new desk (desk=1)
    FvwmBacker: new page (pagex=0,pagey=0,desk=1)
  Select window on desk 1 again:-
    FvwmBacker: new page (pagex=0,pagey=0,desk=1)

Obviously this last command is doing an unnecessary xsetroot, which causes
Exceed to refresh everything (I've verified that a manual xsetroot has the
same result).

I seem to be able to fix the problem by adding a test in ProcessMessage,
which skips any action if the same page and desk is selected (patch to
fvwm-snap-20010510 attached). Is that the right place to fix this?

Thanks,
Tim.

==============================  cut here  ==============================
Tim Adye, BaBar/DELPHI Groups, Particle Physics Dept.,     _   /|
          Rutherford Appleton Laboratory, UK.              \'o.O'   Oop!
e-mail:   [email-masked] or VXCERN::ADYE (HEPNET/SPAN)  =(___)=  Ack!
WWW:      http://hepwww.rl.ac.uk/Delphi/Adye/homepage.html    U  Thphft!

---

From: Dan Espen <[email-masked]>
Date: Fri, 11 May 2001 08:38:05 -0400

> > In modules/FvwmBacker/FvwmBacker.c around line 365, change it to
...
> fvwm-snap-20010510 attached). Is that the right place to fix this?

I'm not clear on why FvwmBacker is getting NEW_PAGE messages when
a window is deiconified.  Can you look in your .fvwm2rc and find the
key or mouse binding that you are using to deiconify the window?

I don't get NEW_PAGE messages when I deiconify.

I notice that I've got FvwmBacker configured like this:

DestroyModuleConfig FvwmBackerDesk
*FvwmBackerDesk 0 Exec xsetroot -solid blue
*FvwmBackerDesk 1 Exec xsetroot -solid midnightblue
*FvwmBackerDesk 2 Exec xsetroot -solid yellow
*FvwmBackerDesk 3 Exec xsetroot -solid black

Where you are using the built in background changing, like this:

DestroyModuleConfig FvwmBackerDesk
*FvwmBackerDesk 0 -solid blue
*FvwmBackerDesk 1 -solid midnightblue
*FvwmBackerDesk 2 -solid yellow
*FvwmBackerDesk 3 -solid black

So I now see where that annoying refresh comes from, around line
218 in FvwmBacker.c there is a call to XSetWindowBackground.
Thats the call that actually causes the refresh.  I think the
"Exec xsetroot" approach is preferrable until FvwmBacker gets
better logic for setting the background.

The change you proposed to FvwmBacker might be a good idea, I'd like
to give it some thought, first I'd like to understand why deiconification
is causing a NEW_PAGE command to be generated.

-- 
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
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: Michael Han <[email-masked]>
Date: Fri, 11 May 2001 07:37:09 -0700

On Fri, May 11, 2001 at 08:38:05AM -0400, Dan Espen wrote:
> [snip]
> [snip]

I vaguely recall something about this. I worked on FvwmBacker a while
back and remember getting a lot of spurious NEW_PAGE events. I don't
know that I ever figured out why.
-- 
[email-masked]                            http://www.mikehan.com/
coffee achiever                              San Francisco, California
"The lunatic, the lover and the poet
Are of imagination all compact:-" A Midsummer Night's Dream, V i
--
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].