Fix deprecation warning on X11
Merge pull request #154 from tomaka/fix-warning-x11

Fix deprecation warning on X11