Re: ProcDamageCreate emits a damage event - why?

2011-03-24 Thread Erkki Seppala

On 24.03.2011 02:25, Keith Packard wrote:

That's icky. Fixing that without losing the damage sent to new clients
might be tricky though.


How about not using the existing machinery for sending the initial 
event? I imagine it would not be many lines of code for that situation. 
Possibly just calling pDamage->damageReport.

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: ProcDamageCreate emits a damage event - why?

2011-03-23 Thread Keith Packard
On Wed, 23 Mar 2011 18:11:48 +0200, Ville Syrjälä  
wrote:

> There is at least one issue with the current implementation; It sends
> the event to all clients who are interested in the same window. So
> if you fire up your vnc screen scraper, your composite manager thinks
> it has to redraw the window. I think that at least should be fixed.

That's icky. Fixing that without losing the damage sent to new clients
might be tricky though.

-- 
keith.pack...@intel.com


pgpIJaRYBMHSx.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: ProcDamageCreate emits a damage event - why?

2011-03-23 Thread Adam Jackson

On 3/23/11 12:11 PM, Ville Syrjälä wrote:


There is at least one issue with the current implementation; It sends
the event to all clients who are interested in the same window. So
if you fire up your vnc screen scraper, your composite manager thinks
it has to redraw the window. I think that at least should be fixed.


Ew, right you are.  That's definitely not intended behaviour.

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: ProcDamageCreate emits a damage event - why?

2011-03-23 Thread Ville Syrjälä
On Wed, Mar 23, 2011 at 11:53:05AM -0400, ext Adam Jackson wrote:
> On 3/23/11 7:24 AM, Erkki Seppala wrote:
> 
> > So what kind of guessing are we talking about here? What is the downside
> > of removing this initial damage event? The downside with the current
> > code is that it can lead to some excess work when no damage has
> > occurred. (I wonder if the behavior can changed, though, if some
> > applications already depend on it.)
> 
> I suspect that the guess, from the client's perspective, is about the 
> actual window geometry at the time the damage was created.
> 
> I can easily imagine clients depending on this behaviour at this point, 
> since it means you don't need to manually do a "first run" of your 
> damage handler against the initial window state; you can just let your 
> event loop pick it up naturally.  If you're a damage-based vnc screen 
> scraper, that's a feature.
> 
> If you have an example where this does cause excess work, it'd be pretty 
> easy to extend the protocol so the damage level argument includes a bit 
> for (not) adding the initial clip.

There is at least one issue with the current implementation; It sends
the event to all clients who are interested in the same window. So
if you fire up your vnc screen scraper, your composite manager thinks
it has to redraw the window. I think that at least should be fixed.

-- 
Ville Syrjälä
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: ProcDamageCreate emits a damage event - why?

2011-03-23 Thread Adam Jackson

On 3/23/11 7:24 AM, Erkki Seppala wrote:


So what kind of guessing are we talking about here? What is the downside
of removing this initial damage event? The downside with the current
code is that it can lead to some excess work when no damage has
occurred. (I wonder if the behavior can changed, though, if some
applications already depend on it.)


I suspect that the guess, from the client's perspective, is about the 
actual window geometry at the time the damage was created.


I can easily imagine clients depending on this behaviour at this point, 
since it means you don't need to manually do a "first run" of your 
damage handler against the initial window state; you can just let your 
event loop pick it up naturally.  If you're a damage-based vnc screen 
scraper, that's a feature.


If you have an example where this does cause excess work, it'd be pretty 
easy to extend the protocol so the damage level argument includes a bit 
for (not) adding the initial clip.


- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel