text: Prevent unexpected notify::direction emissions
Calling gdk_device_get_direction can trigger a notify::direction emissions, since the X11 backend determines the direction on demand. Prevent that by forcing the direction to be determined ahead of time.
Fixes: #5311 (closed)