Terminating X messing up console - broken by commit 7c5ca85a9e6d49ab572831b3e0c08bb4cafb395e

Zhenyu Wang zhenyu.z.wang at intel.com
Mon Sep 8 00:31:08 PDT 2008


On 2008.09.08 09:18:19 +0800, Zhenyu Wang wrote:
> > Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
> > 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20080908/056927dc/attachment.pgp>


More information about the xorg mailing list