On Wed, May 10, 2006 at 12:17:38AM +0200, Dominik Vogt wrote: > On Tue, May 09, 2006 at 11:25:41PM +0200, Viktor Griph wrote: > > On Fri, 5 May 2006, Dominik Vogt wrote: > > > > >On Thu, May 04, 2006 at 08:54:25PM +0200, Viktor Griph wrote: > > >>When are the hide windows useful in frame.c? The call to > > >>frame_reparent_hide_windows in frame_create_move_resize_args casue X to > > >>generate extra VisibilityNotify events to clients during capture and > > >>redecoration (bug #3977). > > > > > >The hide windows are emtpy windows (with a "None" background > > >pixmap). I introduced them to reduce flickering of the window > > >decorations when a window is resized, and - more important - > > >shaded or unshaded. > > > > > >The problem is that when you resize a window, you can tell X which > > >border its subwindows should stick to. But you can not tell it > > >where the subwindows of subwindows should go, and it's not > > >possible to resize subwindows in the same operation. > > > > > >Because of this, I use the hide windows to cover some parts of the > > >decorations, resize the window, redraw the the changed parts of > > >the decorations windows (using a background pixmap, not using the > > >foreground), then unmap the hide windows to uncover the changed > > >decorations. Usually, the hide windows stay "invisible" because > > >htey have no contents and just show what was below them until they > > >are covered by something else. > > > > > > > Now I understand the need for them for resize operations. > > > > >>Would it be possible to narrow down the need for > > >>that function call to some specific case? > > > > > >I don't see any way but at the expense of flickering decorations > > >and subwindows, especially with opaque resizing. > > > > Am I right if I say that the hide windows do no good if it is a setup > > request and the frame size has not changed? I'm not sure how the initial > > mapping is treated, but I believe they do no good for that either. It's > > just a little harder to seed that condition from withing the function. > > I'm not entirely sure about this, but as far as I remember the > hide windows are resized to cover only the relevant parts of the > window. I.e. if the window size does not change, the hide windows > do not cover anything (I'm not sure if the hide windows are used > at all in that case). There may be some room for optimizing here.
I just checked the code. As far as I can see, the hide windows just cover the decorations if the window size does not change. Unless the size calculations are going wrong I can not see why this causes extra Expose/VisibilityNotify events on the client window. > > >Actually, if applications like xdvi have a below par redraw > > >algorithm (i.e. they redraw whenexer they receive an Expose > > >event), that's the applications' problem and not the problem of > > >the window manager. > > > > It's true that the application may be behaving badly, but there are > > several application that show similar flickering due to the exrtra events > > on a redecoration. if it's possible to work around the events with the > > window mannager it's a good thing to do, but not at the expense of some > > other functionality. Just for reference the thing that annoys me most > > about this is the fact that my titleless pager and xbuffy flash whenever > > I redecorate (including even disable an already disabled title bar button) Ciao Dominik ^_^ ^_^ -- Dominik Vogt, [EMAIL PROTECTED]
signature.asc
Description: Digital signature