[PATCH] composite: use config notify hook to do pixmap resize.
Dave Airlie
airlied at gmail.com
Thu Jun 3 17:45:25 PDT 2010
On Fri, Jun 4, 2010 at 12:36 AM, Keith Packard <keithp at keithp.com> wrote:
> On Thu, 3 Jun 2010 19:06:35 +1000, Dave Airlie <airlied at gmail.com> wrote:
>> From: Dave Airlie <airlied at redhat.com>
>>
>> Since reallocating the backing pixmap can fail, we need to try and do it before any other side effects of reconfiguring the window happen.
>>
>> This changes the ConfigNotify hook to return a Bool, and moves the
>> composite window reconfiguration wrappers to ConfigNotify. They all
>> basically did the same thing, so we can drop the MoveWindow,
>> ResizeWindow, ChangeBorderWidth wrappers, and allow ConfigNotify to do
>> all the work. If reallocation fails we fail before we send any
>> confiureNotify events, or enter the area we can't recover from.
>
> I like this change, but I think ConfigNotify should return a Status
> instead of a Bool.
since nothing seemed to return a Status type, I just made it return int.
New patch sent, please apply if you are happy, I can't think we are
going to find too many other reviewers ;-P
>
> For older servers, I'd suggest just placing a call to composite inside
> ConfigureWindow, calling a function that checks to see if the extension was
> enabled and then calls compConfigNotify.
Calling from dix into composite involves pain, since we won't link,
but I'll start working on the backport now that I think the upstream
solution is okay.
Dave.
More information about the xorg-devel
mailing list