gdk3: use divisible value for test to avoid rounding

GitHub: fix #178

Reported by mtasaka. Thanks!!!