[mcclim-devel] Weird gray regions bug in Clouseau

Gilbert Baumann gilbert at base-engineering.com
Sat Dec 3 17:29:57 UTC 2005


Peter Scott <sketerpot at gmail.com> writes:
> When I open Clouseau and expand what I'm inspecting so that it goes
> off the screen, I see gray regions if I scroll to the right or down.
> Here's a screenshot:
> 
> http://www.ece.iastate.edu/~pjscott/inspector-bug.png

You all were on the wrong track ...

First off, the pane hierarchy in the Clouseau application is a little
strange: The stream pane is inside a border pane inside a vrack pane
inside a viewport inside the scroller pane. You would get a saner
hierarchy by saying :scroll-bars t in the definition of the 'app' pane
and skip the scrolling in the layout. 

Anyhow, still there is a bug. 

After looking into it, I saw that space requirements are fine. The
space requirements of the stream are properly distributed up to the
scroller pane, which you can also see in the correct
min/max/thumb-size values of the scroll bar.

I looked at the sheet regions and transformations and they all looked
perfectly fine. Then I investigated actual sheet geometry as the X
server believes. And there is our bug: The X server disagrees with
CLIM!

So the defect is in the coordinate swizzling code of mine. The
documentation string of UPDATE-MIRROR-GEOMETRY, which is the function
responsible for synchronizing the sheet geometry to the X server,
states:

| [...] This function is supposed to be called whenever one of the
| following happens:
|
| [...]
|  - the parent's native transformation changed
|  - the parent's transformation changed
|  - the parent's mirror region changed

And exactly these are the cases, we miss.

Doing

  (defmethod note-sheet-transformation-changed ((sheet mirrored-sheet-mixin))
    (update-mirror-geometry sheet)
+   (mapc #'update-mirror-geometry (sheet-children sheet)))

seems to help.

For completeness we also should do:

  (defmethod note-sheet-region-changed ((sheet mirrored-sheet-mixin))
    (update-mirror-geometry sheet)
    (mapc #'update-mirror-geometry (sheet-children sheet)) )

This should be regarded as a temporary fix, since IMHO
UPDATE-MIRROR-GEOMETRY itself should decide when to update the native
region or transformation of a child of a sheet.

-- 
Gilbert Baumann



More information about the mcclim-devel mailing list