In Python, how would I get the active root window (or screen if you will) using gtk.gdk? I'm looking for a cross-platform solution.
The below code returns all my three monitors
gtk.gdk.get_default_root_window()
By active root window, I'd be happy with either the one the cursor is currently on, or the one the focused window is on.
Potentially helpful links:
[1] python pygtk how to put a window on a specific display monitor
EDIT: I attempted to implement the solution described in link #1, however screen.get_active_window()
returns None
and not an instance of gtk.gdk.Window
.