Make sure RandR events are delivered from RRCrtcSet.
Some paths were skipping the event delivery stage. (cherry picked from commit 9ca7ba5d6012295a77ed773c656e786440da973d)
This commit is contained in:
		
							parent
							
								
									510eaa346e
								
							
						
					
					
						commit
						86d76390eb
					
				|  | @ -262,6 +262,8 @@ RRCrtcSet (RRCrtcPtr    crtc, | ||||||
| 	   RROutputPtr  *outputs) | 	   RROutputPtr  *outputs) | ||||||
| { | { | ||||||
|     ScreenPtr	pScreen = crtc->pScreen; |     ScreenPtr	pScreen = crtc->pScreen; | ||||||
|  |     Bool	ret = FALSE; | ||||||
|  |     rrScrPriv(pScreen); | ||||||
| 
 | 
 | ||||||
|     /* See if nothing changed */ |     /* See if nothing changed */ | ||||||
|     if (crtc->mode == mode && |     if (crtc->mode == mode && | ||||||
|  | @ -271,61 +273,64 @@ RRCrtcSet (RRCrtcPtr    crtc, | ||||||
| 	crtc->numOutputs == numOutputs && | 	crtc->numOutputs == numOutputs && | ||||||
| 	!memcmp (crtc->outputs, outputs, numOutputs * sizeof (RROutputPtr))) | 	!memcmp (crtc->outputs, outputs, numOutputs * sizeof (RROutputPtr))) | ||||||
|     { |     { | ||||||
| 	return TRUE; | 	ret = TRUE; | ||||||
|     } |     } | ||||||
|     if (pScreen) |     else | ||||||
|     { |     { | ||||||
| #if RANDR_12_INTERFACE | #if RANDR_12_INTERFACE | ||||||
| 	rrScrPriv(pScreen); |  | ||||||
| 	if (pScrPriv->rrCrtcSet) | 	if (pScrPriv->rrCrtcSet) | ||||||
| 	{ | 	{ | ||||||
| 	    return (*pScrPriv->rrCrtcSet) (pScreen, crtc, mode, x, y,  | 	    ret = (*pScrPriv->rrCrtcSet) (pScreen, crtc, mode, x, y,  | ||||||
| 					   rotation, numOutputs, outputs); | 					  rotation, numOutputs, outputs); | ||||||
| 	} | 	} | ||||||
|  | 	else | ||||||
| #endif | #endif | ||||||
| #if RANDR_10_INTERFACE |  | ||||||
| 	if (pScrPriv->rrSetConfig) |  | ||||||
| 	{ | 	{ | ||||||
| 	    RRScreenSize	    size; | #if RANDR_10_INTERFACE | ||||||
| 	    RRScreenRate	    rate; | 	    if (pScrPriv->rrSetConfig) | ||||||
| 	    Bool		    ret; | 	    { | ||||||
|  | 		RRScreenSize	    size; | ||||||
|  | 		RRScreenRate	    rate; | ||||||
| 
 | 
 | ||||||
| 	    if (!mode) | 		if (!mode) | ||||||
| 	    { | 		{ | ||||||
| 		RRCrtcNotify (crtc, NULL, x, y, rotation, 0, NULL); | 		    RRCrtcNotify (crtc, NULL, x, y, rotation, 0, NULL); | ||||||
| 		return TRUE; | 		    ret = TRUE; | ||||||
|  | 		} | ||||||
|  | 		else | ||||||
|  | 		{ | ||||||
|  | 		    size.width = mode->mode.width; | ||||||
|  | 		    size.height = mode->mode.height; | ||||||
|  | 		    if (outputs[0]->mmWidth && outputs[0]->mmHeight) | ||||||
|  | 		    { | ||||||
|  | 			size.mmWidth = outputs[0]->mmWidth; | ||||||
|  | 			size.mmHeight = outputs[0]->mmHeight; | ||||||
|  | 		    } | ||||||
|  | 		    else | ||||||
|  | 		    { | ||||||
|  | 			size.mmWidth = pScreen->mmWidth; | ||||||
|  | 			size.mmHeight = pScreen->mmHeight; | ||||||
|  | 		    } | ||||||
|  | 		    size.nRates = 1; | ||||||
|  | 		    rate.rate = RRVerticalRefresh (&mode->mode); | ||||||
|  | 		    size.pRates = &rate; | ||||||
|  | 		    ret = (*pScrPriv->rrSetConfig) (pScreen, rotation, rate.rate, &size); | ||||||
|  | 		    /*
 | ||||||
|  | 		     * Old 1.0 interface tied screen size to mode size | ||||||
|  | 		     */ | ||||||
|  | 		    if (ret) | ||||||
|  | 		    { | ||||||
|  | 			RRCrtcNotify (crtc, mode, x, y, rotation, 1, outputs); | ||||||
|  | 			RRScreenSizeNotify (pScreen); | ||||||
|  | 		    } | ||||||
|  | 		} | ||||||
| 	    } | 	    } | ||||||
| 
 |  | ||||||
| 	    size.width = mode->mode.width; |  | ||||||
| 	    size.height = mode->mode.height; |  | ||||||
| 	    if (outputs[0]->mmWidth && outputs[0]->mmHeight) |  | ||||||
| 	    { |  | ||||||
| 		size.mmWidth = outputs[0]->mmWidth; |  | ||||||
| 		size.mmHeight = outputs[0]->mmHeight; |  | ||||||
| 	    } |  | ||||||
| 	    else |  | ||||||
| 	    { |  | ||||||
| 		size.mmWidth = pScreen->mmWidth; |  | ||||||
| 		size.mmHeight = pScreen->mmHeight; |  | ||||||
| 	    } |  | ||||||
| 	    size.nRates = 1; |  | ||||||
| 	    rate.rate = RRVerticalRefresh (&mode->mode); |  | ||||||
| 	    size.pRates = &rate; |  | ||||||
| 	    ret = (*pScrPriv->rrSetConfig) (pScreen, rotation, rate.rate, &size); |  | ||||||
| 	    /*
 |  | ||||||
| 	     * Old 1.0 interface tied screen size to mode size |  | ||||||
| 	     */ |  | ||||||
| 	    if (ret) |  | ||||||
| 	    { |  | ||||||
| 		RRCrtcNotify (crtc, mode, x, y, rotation, 1, outputs); |  | ||||||
| 		RRScreenSizeNotify (pScreen); |  | ||||||
| 	    } |  | ||||||
| 	    return ret; |  | ||||||
| 	} |  | ||||||
| #endif | #endif | ||||||
| 	RRTellChanged (pScreen); | 	} | ||||||
|  | 	if (ret) | ||||||
|  | 	    RRTellChanged (pScreen); | ||||||
|     } |     } | ||||||
|     return FALSE; |     return ret; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  | @ -718,6 +723,7 @@ ProcRRSetCrtcConfig (ClientPtr client) | ||||||
| 	goto sendReply; | 	goto sendReply; | ||||||
|     } |     } | ||||||
|      |      | ||||||
|  | #if 0 | ||||||
|     /*
 |     /*
 | ||||||
|      * if the client's config timestamp is not the same as the last config |      * if the client's config timestamp is not the same as the last config | ||||||
|      * timestamp, then the config information isn't up-to-date and |      * timestamp, then the config information isn't up-to-date and | ||||||
|  | @ -728,6 +734,7 @@ ProcRRSetCrtcConfig (ClientPtr client) | ||||||
| 	rep.status = RRSetConfigInvalidConfigTime; | 	rep.status = RRSetConfigInvalidConfigTime; | ||||||
| 	goto sendReply; | 	goto sendReply; | ||||||
|     } |     } | ||||||
|  | #endif | ||||||
|      |      | ||||||
|     /*
 |     /*
 | ||||||
|      * Validate requested rotation |      * Validate requested rotation | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue