diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2013-02-25 15:20:41 +0000 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-02-26 13:29:52 -0600 |
commit | 1ed76b59c4f8670eb06df48cebe086da06111e1f (patch) | |
tree | 9bfde16e9d8fa3bf06d4e3d1524f4764d967fc24 /ui/gtk.c | |
parent | 8906de769be0978fed31a0341d0a5829a4ef7ecf (diff) | |
download | qemu-1ed76b59c4f8670eb06df48cebe086da06111e1f.tar.gz qemu-1ed76b59c4f8670eb06df48cebe086da06111e1f.tar.bz2 qemu-1ed76b59c4f8670eb06df48cebe086da06111e1f.zip |
Conditionalize use of gtk_widget_size_request
The gtk_widget_size_request method has been replaced by
the gtk_widget_get_preferred_size method in GTK3. Conditionally
call the new method in GTK3
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-9-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui/gtk.c')
-rw-r--r-- | ui/gtk.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -305,7 +305,11 @@ static void gd_resize(DisplayState *ds) gtk_widget_set_size_request(s->drawing_area, ds_get_width(ds) * s->scale_x, ds_get_height(ds) * s->scale_y); +#if GTK_CHECK_VERSION(3, 0, 0) + gtk_widget_get_preferred_size(s->vbox, NULL, &req); +#else gtk_widget_size_request(s->vbox, &req); +#endif gtk_window_resize(GTK_WINDOW(s->window), req.width * sx, req.height * sy); |