Redo r5090 using functions that are available in older
Xorg versions as well.


git-svn-id: https://tigervnc.svn.sourceforge.net/svnroot/tigervnc@5100 3789f03b-4d11-0410-bbf8-ca57d06f2519
Copy r5098 from trunk.


git-svn-id: https://tigervnc.svn.sourceforge.net/svnroot/tigervnc@5101 3789f03b-4d11-0410-bbf8-ca57d06f2519
Copy r5099 from trunk.


git-svn-id: https://tigervnc.svn.sourceforge.net/svnroot/tigervnc@5102 3789f03b-4d11-0410-bbf8-ca57d06f2519
Copy r5100 from trunk.


git-svn-id: https://tigervnc.svn.sourceforge.net/svnroot/tigervnc@5103 3789f03b-4d11-0410-bbf8-ca57d06f2519