Search code examples
gtksignalsresize

GTK detecting window resize from the user


In GTK (or pygtk or gtkmm...)

How can I detect that an application window has been manually resized by the user, as is typically done by dragging the window's edge?

I need to find a way to differentiate manual resizes from resizes that originate from gtk, such as changes in window content.


Solution

  • Have you tried connecting to the GDK_CONFIGURE event?

    Check out this example under the "Moving window" section. The example shows a callback doing something when the window is moved, but the configure event is a catch-all for moving, resizing and stack order events.