Subject: CVS domivogt: * Reworked decoration drawing code to reduce flickering.

From: CVS <[email-masked]>
Date: Sun, 18 Feb 2001 18:07:17 -0600 (CST)

CVSROOT:	/home/cvs/fvwm
Module name:	fvwm
Changes by:	domivogt	01/02/18 18:07:17

Modified files:
	.              : ChangeLog 
	fvwm           : borders.c borders.h events.c menus.c misc.c 
	                 misc.h 
	libs           : Graphics.c fvwmlib.h 

Log message:
* Reworked decoration drawing code to reduce flickering.

--
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: Mikhael Goikhman <[email-masked]>
Date: Mon, 19 Feb 2001 08:20:23 -0600

> * Reworked decoration drawing code to reduce flickering.

A very good work, I am impressed. Borders do not flicker on expose.
Is it also possible to suppress border flickering on Raise command?

Now you may close todo #171. I think it is ok to postpone the problems of
Style BackingStore with +bs on XServer, described in my other message.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 19 Feb 2001 15:26:36 +0100

> Is it also possible to suppress border flickering on Raise command?

Hm, I didn't look at the code yet, but it seems that the Raise
operation does not wait for the Expose event but redraws the
decorations explicitly.  I believe to remember there was a reason
for this - something with complex functions.  In this case we'd
have to know the parts that will, be exposed by raising the
window.

> Style BackingStore with +bs on XServer, described in my other message.

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
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, 19 Feb 2001 15:30:54 +0100

> have to know the parts that will, be exposed by raising the

Fixed :o)

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 19 Feb 2001 10:51:02 -0600

> > > Is it also possible to suppress border flickering on Raise command?

You fix bugs faster than I compose them. :)

Now there is the following problem. Get a window with stippled titles
(for example, sticky window), lower it, obscure it, move without raising,
stpples are not fully redrawn.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 19 Feb 2001 18:37:48 +0100

> stpples are not fully redrawn.

Works perfectly for me.  The RedrawTitle() function looks good to
me.  I can't anything that could cause it there.  Can you try to
find a minimal config file for this?

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 19 Feb 2001 11:47:41 -0600

> find a minimal config file for this?

Since you use something similar to "luthien" theme and I use something
similar to "migo" theme, to reproduce this you may execute:

  TitleStyle TiledPixmap /some/title.xpm

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 19 Feb 2001 18:57:50 +0100

>   TitleStyle TiledPixmap /some/title.xpm

It still works fine for me.

BTW, I just fixed the menu posting bug.

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 19 Feb 2001 18:31:39 -0600

> It still works fine for me.

Strange, I can easily reproduce this with any pixmap.
Try this minimal file ~/.fvwm/test/6 and (re)start: fvwm2 -f test/6

  TitleStyle TiledPixmap /some/existing/title.xpm
  Mouse 1 T A Move
  All (Test*) Close
  OpaqueMoveSize 100
  Exec exec xterm -name Test1 -g +100+200
  Wait Test1
  Next (Test1) Stick
  Exec exec xterm -name Test2 -g +200+100

You may use /usr/local/share/fvwm/themes/migo/images/decor/title-active.xpm
if you have one, but the image used is not important.

Now, while the sticky xterm is on bottom, move it by dragging on the
title, or move another xterm. The stipples are not fully redrawn.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 20 Feb 2001 17:36:46 +0100

> title, or move another xterm. The stipples are not fully redrawn.

WOrks perfectly for me.  I guess you will have to look at the code
yourself.  The only whing I don't understand is why the line

  Next (Test1) Stick

does not work.  The Test1 window is created (with the correct
title), but the function does not make it sticky.

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 20 Feb 2001 11:00:23 -0600

On 20 Feb 2001 17:36:46 +0100, Dominik Vogt wrote:
> yourself. 

Ok, I will see what I can find.

> The only whing I don't understand is why the line
> 
>   Next (Test1) Stick
> 

Really strange. If not an empty config, I would think you have some
CirculateSkip, in which case a more correct line would be:

  Next (Test1, CirculateHit, CirculateHitIcon, CirculateHitShaded) Stick

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 20 Feb 2001 18:10:57 +0100

>   Next (Test1, CirculateHit, CirculateHitIcon, CirculateHitShaded) Stick

No, I have nothing like that.  If I issue the line manually it
works.  It is probably a timing problem with the "Wait" line.

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 20 Feb 2001 14:40:38 -0600

I think I have found the problem.

RedrawTitle() was patched well, so the clip for the stipples is defined
correctly, but DrawButton() (called from RedrawTitle()) was not patched
enough, so the clip is bigger than needed - block near the line 284.
The result is that the whole (tiled) pixmap is drawn, this overwrites
stipples outside the needed clip, so a part of the pixmap is not stippled.

I think there is the same problem for TitleStyle Pixmap, not only for
TitleStyle TiledPixmap. I don't know why you can't reproduce this.

Is it ok to ask you to finish the clip patch for button pixmaps?

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 21 Feb 2001 12:04:52 +0100

> stipples outside the needed clip, so a part of the pixmap is not stippled.

Try as I might, I can't reproduce it, but your analysis seems
correct.  The stipples were clipped and the pixmap tiles were not.

> Is it ok to ask you to finish the clip patch for button pixmaps?

Try the code I committed.

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 21 Feb 2001 07:36:10 -0600

> correct.  The stipples were clipped and the pixmap tiles were not.

Maybe X Server differences? Last few days I run XFree86-4.0.1 with +bs.

> Try the code I committed.

Yes, both TitleStyle TiledPixmap and TitleStyle Pixmap are fixed now.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 21 Feb 2001 14:55:46 +0100

> Maybe X Server differences? Last few days I run XFree86-4.0.1 with +bs.

XFree86-4.0.0 with no options which probably means that backing
store is enabled.  I tried

  Style * backingstoreoff, saveunderoff

but that had no effect.

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 21 Feb 2001 08:12:02 -0600

>   Style * backingstoreoff, saveunderoff

For me the default in XFree86-4.0.x: backing-store NO, save-unders NO.
When I specify +bs, xdpyinfo gives: backing-store YES, save-unders YES.

This does not matter though until the corresponding style options are on.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 21 Feb 2001 16:50:41 +0100

> When I specify +bs, xdpyinfo gives: backing-store YES, save-unders YES.

  $ xdpyinfo
  ...
    options:    backing-store YES, save-unders YES
  ...

> This does not matter though until the corresponding style options are on.

If the server's backing store option is enabled, it's up to the
Server to decide it backing store is used or not I think.

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 21 Feb 2001 10:16:43 -0600

> Server to decide it backing store is used or not I think.

The man page says that it is up to FVWM to decide. And I only really feel
+bs and +su when they are both enabled in the server *and* in the Style.
I already wrote that there are some problems with this mode.

              The BackingStore and SaveUnder  styles  enable  the
              corresponding  window  attributes  in the X server.
              BackingStore means that the X server tries to  keep
              the obscured parts of a window in memory while win-
              dows with SaveUnder store the graphics below  them.
              Either  option  can speed up fvwm if the connection
              to the X server is slow (e.g. over a  modem  link).
              By  default  both styles are turned off.  To switch
              them off explicitly you can use the BackingStoreOff
              and SaveUnderOff styles.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 21 Feb 2001 17:39:12 +0100

>               them off explicitly you can use the BackingStoreOff

Well, I wrote this paragraph, but I still think it's up to the X
server to make the final decision (e.g. depending on available
memory).

Bye

Dominik ^_^  ^_^