add conditional compilation to register widget's gdk window depending on gtk version