Every property emits a signal whenever it's value is changed.
The "notify::" part will do the trick. Try something like this: Code: g_signal_connect (win, "notify::is-topmost", G_CALLBACK(cb_func), NULL);
g_signal_connect (win, "notify::is-topmost", G_CALLBACK(cb_func), NULL);
self.mainwindow.connect('notify::is-topmost', self.got_focus, 'notify::is-topmost')