Re: Find out if window is active



Doesnt work here either. The window becomes active when i focus it for the first time, after wards the callback is never called again.

On 15/04/13 02:06, Matthias Clasen wrote:
        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]