After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 610462 - Add gtk_widget_get_requisition()
Add gtk_widget_get_requisition()
Status: RESOLVED DUPLICATE of bug 548026
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-02-19 15:15 UTC by Michael Natterer
Modified: 2010-02-19 15:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Natterer 2010-02-19 15:15:03 UTC
This is rarely needed, but a very useful optimization in this case:

static void
model_changed_callback (Model     *model,
                        GtkWidget *view)
{
  if (model->width != view->requisition.width ||
      model->height != view_requisition.height)
    {
      gtk_widget_queue_resize (widget);
    }
  else
    {
      gtk_widget_queue_draw (widget);
    }
}

Will attach a trivial patch.
Comment 1 Michael Natterer 2010-02-19 15:16:03 UTC

*** This bug has been marked as a duplicate of bug 548026 ***