Well, I've done some more work on synchronization, and now I've got a Qt/kwin 
combo that is (in theory) compliant with the protocol I outlined in: 
Some notes: 
- I decided to stick with the non-blocking method using SYNC alarms. I've got a 
an initial revision of a blocking implementation, but getting Qt to draw over a 
seperate X pipe is quite difficult and thus not a good approach for kwin right 
now. Maybe its easier to do this in Metacity? 
In any case, it appears that there is a bug in the current SYNC 
implementation's XSyncValueSubtract macro (either that, or I am completely 
misunderstanding the XSyncValue* macros). Eg: subtracting 2 from 1 will not 
equal 1. This results in the X server not sending XSyncCounterNotify events 
when awakening blocked clients, which makes the blocking implementation much 
more cumbersome to implement.  
- kwin now plays with the SYNC priorities of windows. The straight-forward 
implementation of raising the foreground client's priority doesn't work, 
because it results in all the clients behind it being starved. What does work, 
however, is lowering the window-manager's priority while resizing. Since the 
client apps all remain at the same priority, underlying windows aren't starved. 
However, since the client's drawing gets priority over the window manager's, 
the gap beteween the window frame and client contents is minimized. This effect 
is especially noticible with clients that cannot keep up with the resize, such 
as Konqueror opened up to Priority lowering eliminates a very 
large, ugly, gap in this case.  
Right now, resize performance on my 2 GHz P4 is about as good as in Windows XP, 
though it is more flickery. All in all, that's pretty reasonable. 
If nobody has any objections, I'll start on a GTK+ patch and see how well that 
Unified diff's are available at: 
(Kwin patch, relative to kdebase/kwin): 
(Qt patch, relative to qt-copy/src/kernel): 
(Kdebase patch, relative to kdebase): 
    Rayiner Hashem 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]