Re: Find out if window is active



       g_signal_connect (window, "notify::is-active",
                          G_CALLBACK (print_active), NULL);

with

static void
print_active (GtkWindow *window)
{
  g_print ("active: %d\n", gtk_window_is_active (window));
}

works as expected here, and prints "active: 1" and "active: 0" as the
window becomes active or inactive.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]