Don't use deprecated gdk_get_display()
Fix a sign comparison warning