Enables or disables a GdkDevice to interact with widget and all its children.
widget
It does so by descending through the GdkWindow hierarchy and enabling the same mask that is has for core events (i.e. the one that gdk_window_get_events() returns).
gdk_window_get_events()