Device.getLastEventWindow
gdk.window.Window getLastEventWindow()Gets information about which window the given pointer device is in, based on events that have been received so far from the display server. If another application has a pointer grab, or this application has a grab with owner_events = false, null may be returned even if the pointer is physically over one of this application's windows.
Returns
the last window the device