GtkWindow::has_toplevel_focus

bool has_toplevel_focus();

Returns whether or not input focus is within the window. For toplevel windows, this method returns the same result as is_active() , but for embedded windows like GtkPlug the results may be different.

See also: is_active() has-toplevel-focus