qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Cole Robinson <crobinso@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 09/12] ui: gtk: Fix a runtime warning on vte >= 0.37
Date: Tue, 10 May 2016 07:51:54 +0200	[thread overview]
Message-ID: <1462859517-30207-10-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1462859517-30207-1-git-send-email-kraxel@redhat.com>

From: Cole Robinson <crobinso@redhat.com>

inner-border was dropped in vte API 2.91, in favor of the standard
padding style

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Message-id: 60a6cdc337d611d902f53907e66a8f37ea374d65.1462557436.git.crobinso@redhat.com

[ kraxel: Fix warning with old vte version. ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/gtk.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/ui/gtk.c b/ui/gtk.c
index 9876d89..28e7d28 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -330,6 +330,17 @@ static void gd_update_geometry_hints(VirtualConsole *vc)
         VteTerminal *term = VTE_TERMINAL(vc->vte.terminal);
         GtkBorder *ib;
 
+#if VTE_CHECK_VERSION(0, 37, 0)
+        GtkBorder padding;
+        gtk_style_context_get_padding(
+                gtk_widget_get_style_context(vc->vte.terminal),
+                gtk_widget_get_state_flags(vc->vte.terminal),
+                &padding);
+        ib = &padding;
+#else
+        gtk_widget_style_get(vc->vte.terminal, "inner-border", &ib, NULL);
+#endif
+
         geo.width_inc  = vte_terminal_get_char_width(term);
         geo.height_inc = vte_terminal_get_char_height(term);
         mask |= GDK_HINT_RESIZE_INC;
@@ -339,7 +350,7 @@ static void gd_update_geometry_hints(VirtualConsole *vc)
         geo.min_width  = geo.width_inc * VC_TERM_X_MIN;
         geo.min_height = geo.height_inc * VC_TERM_Y_MIN;
         mask |= GDK_HINT_MIN_SIZE;
-        gtk_widget_style_get(vc->vte.terminal, "inner-border", &ib, NULL);
+
         if (ib) {
             geo.base_width  += ib->left + ib->right;
             geo.base_height += ib->top + ib->bottom;
-- 
1.8.3.1

  parent reply	other threads:[~2016-05-10  5:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10  5:51 [Qemu-devel] [PULL 00/12] ui patch queue Gerd Hoffmann
2016-05-10  5:51 ` [Qemu-devel] [PULL 01/12] ui: gtk: fix crash when terminal inner-border is NULL Gerd Hoffmann
2016-05-10  5:51 ` [Qemu-devel] [PULL 02/12] ui: sdl2: Release grab before opening console window Gerd Hoffmann
2016-05-10  5:51 ` [Qemu-devel] [PULL 03/12] configure: build SDL if only SDL2 available Gerd Hoffmann
2016-05-10  5:51 ` [Qemu-devel] [PULL 04/12] configure: error on unknown --with-sdlabi value Gerd Hoffmann
2016-05-10  5:51 ` [Qemu-devel] [PULL 05/12] configure: add echo_version helper Gerd Hoffmann
2016-05-10  5:51 ` [Qemu-devel] [PULL 06/12] configure: report GTK version Gerd Hoffmann
2016-05-10  5:51 ` [Qemu-devel] [PULL 07/12] configure: report SDL version Gerd Hoffmann
2016-05-10  5:51 ` [Qemu-devel] [PULL 08/12] configure: support vte-2.91 Gerd Hoffmann
2016-05-10  5:51 ` Gerd Hoffmann [this message]
2016-05-10  5:51 ` [Qemu-devel] [PULL 10/12] ui: gtk: Fix some deprecation warnings Gerd Hoffmann
2016-05-10  5:51 ` [Qemu-devel] [PULL 11/12] ui/gtk: copy to clipboard support Gerd Hoffmann
2016-05-10  5:51 ` [Qemu-devel] [PULL 12/12] spice/gl: add & use qemu_spice_gl_monitor_config Gerd Hoffmann
2016-05-10 14:08 ` [Qemu-devel] [PULL 00/12] ui patch queue Cole Robinson
2016-05-12 13:26 ` Peter Maydell
2016-05-12 13:57   ` Gerd Hoffmann
2016-05-13  7:56     ` Gerd Hoffmann
2016-05-13 10:13       ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462859517-30207-10-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=crobinso@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).