On 2008.09.08 09:18:19 +0800, Zhenyu Wang wrote:
> > Author: Zhenyu Wang <[EMAIL PROTECTED]>
> > Date:   Wed Sep 3 09:41:00 2008 +0800
> > 
> >     randr: fix user mode create initial reference count
> > 
> >     Don't need extra reference count adding when creating user mode.
> >     This fixes user mode destroy, otherwise we get BadAccess error.
> > 
> > 
> > Reverting this commit restore the console properly. Without reverting,
> > the screen is messed up with colorful patterns, but keyboard is still
> > functioning.
> 
> oops, looks so, I'd revert this before finding out what's broken.
> 

Randr mode has taken output reference into account in create, but which
is not true for user mode, as in user mode create there's no output assignment
at that moment.

So following one line should fix the user mode refcount issue, is this ok
to push?

diff --git a/randr/rrmode.c b/randr/rrmode.c
index d507208..0280a68 100644
--- a/randr/rrmode.c
+++ b/randr/rrmode.c
@@ -153,6 +153,7 @@ RRModeCreateUser (ScreenPtr pScreen,
        *error = BadAlloc;
        return NULL;
     }
+    mode->refcnt = 1;
     *error = Success;
     return mode;
 }

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

Attachment: signature.asc
Description: Digital signature

_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to