I'm attempting to capture an event on a GTK window when the window is moved. I'm doing so with something that looks like this:
void mycallback(GtkWindow* parentWindow, GdkEvent* event, gpointer data)
{
// do something...
}
...
GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_add_events(GTK_WIDGET(window), GDK_CONFIGURE);
g_signal_connect_(G_OBJECT(window), "configure-event", G_CALLBACK(mycallback), NULL);
...
This works- the event is properly called when the window is moved... but it's also called when the window is resized. This has the side effect of not resizing the window's sub-elements as they would if I didn't connect the event.
According to this table in the GTK docs, the GDK_CONFIGURE event does not propagate. If the event does not propagate, how can I still detect the window's movement while allowing it to resize properly?
note: I'm using GTK version 2.12.9