[mcclim-devel] Repainting of shrinking windows?

Daniel Katz dpkatz at gmail.com
Mon Sep 11 11:22:26 UTC 2006


On Sep 10, 2006, at 15:29, Clemens Fruhwirth wrote:

> At Sun, 10 Sep 2006 08:54:36 -0400,
> Daniel Katz <dpkatz at gmail.com> wrote:
>
>> Clearly, the "shrink window" event is not being acted on for
>> recentering purposes.  But is this a bug in McClim (i.e., it  
>> should be
>> repainting on shrink but is not), or is it a bug in the Mac OS X
>> X11.app (i.e., it should be sending some sort of message on shrink
>> but is not) or is it my misunderstanding (i.e., I should be adding  
>> some code
>> to get the repaint to activate on shrink, and I have not done so)?
>
> I think McCLIM acts alright to not send repaint events as no window
> damage is reported.

Okay -- this makes sense.  The 'handle-repaint' function says what to do
when a repaint is triggered, but doesn't say anything about the
circumstances under which a repaint will happen (e.g., when the text
becomes de-centered due to some window manipulation).  That was the
source of my confusion, I think.





> To fix this, Hello World should also listen to the window- 
> configuration-event.
>
> (defmethod handle-event ((pane hello-world-pane) (event window- 
> configuration-event))
>   (handle-repaint paint +everwhere+))

I assume that the final subform is meant to be (handle-repaint pane  
+everywhere+).


For the record, I tried this and didn't get the behavior of having  
the text
re-center when shrinking the window.  I then tried to test whether I was
getting window-configuration-event's with the following

(defmethod handle-event ((pane hello-world-pane) (event window- 
configuration-event))
   (print (class-of event))
   (terpri)
   (handle-repaint pane +everywhere+))

and found that I was getting no events anywhere.  Finally, I tried to  
examine all
of the relevant window-events with

(defmethod handle-event ((pane hello-world-pane) (event window-event))
   (print (class-of event))
   (terpri)
   (handle-repaint pane +everywhere+))

and found that every time I expanded the window I was getting a
#<STANDARD-CLASS WINDOW-REPAINT-EVENT>, and no event at all
for shrinking the window.  Seems peculiar to me (perhaps something
in the interaction of the window manager and CLIM?), but it's not what I
was really going after when I started this thread so I'm going to  
ignore it for now
and continue with the paper.





Thanks for your help!

Dan




More information about the mcclim-devel mailing list