+/* Periodically check the toplevel's size
+ * (the hack in toplevel_size_allocate() means we could in principle
+ * miss a user-initiated resize)
+ */
+static void check_toplevel_size(const char attribute((unused)) *event,
+ void attribute((unused)) *evendata,
+ void attribute((unused)) *callbackdata) {
+ GtkAllocation a;
+ gtk_window_get_size(GTK_WINDOW(toplevel), &a.width, &a.height);
+ toplevel_size_allocate(NULL, &a, NULL);
+}
+