Created attachment 14689 [details] [review]
I had posted this patch in xorg@ mailing list some time ago,
but now opening a bug report to avoid it being missed.
thanks. pushed as a59ffb3cdc9d68a0ad21f04831e4255ad0e985d8.