gtk2: remove trailing spaces
gtk2: use "ifdef" instead of "if defined"

Because "ifdef" is used in other locations.
gdk3: add tests for Gdk::Event