summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/terminal-screen.c10
-rw-r--r--src/terminal-window.c8
2 files changed, 10 insertions, 8 deletions
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index ba30e39..01bec75 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -1167,6 +1167,7 @@ terminal_screen_set_font (TerminalScreen *screen)
TerminalScreenPrivate *priv = screen->priv;
TerminalProfile *profile;
PangoFontDescription *desc;
+ int size;
profile = priv->profile;
@@ -1176,14 +1177,11 @@ terminal_screen_set_font (TerminalScreen *screen)
g_object_get (profile, TERMINAL_PROFILE_FONT, &desc, NULL);
g_assert (desc);
+ size = pango_font_description_get_size (desc);
if (pango_font_description_get_size_is_absolute (desc))
- pango_font_description_set_absolute_size (desc,
- priv->font_scale *
- pango_font_description_get_size (desc));
+ pango_font_description_set_absolute_size (desc, priv->font_scale * size);
else
- pango_font_description_set_size (desc,
- priv->font_scale *
- pango_font_description_get_size (desc));
+ pango_font_description_set_size (desc, (int)(priv->font_scale * size));
vte_terminal_set_font (VTE_TERMINAL (screen), desc);
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 66af860..c1cb230 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -2936,7 +2936,9 @@ notebook_button_press_cb (GtkWidget *widget,
if ((event->type == GDK_BUTTON_PRESS && event->button == 2) &&
(g_settings_get_boolean (settings, "middle-click-closes-tabs")))
{
- tab_clicked = find_tab_num_at_pos (notebook, event->x_root, event->y_root);
+ tab_clicked = find_tab_num_at_pos (notebook,
+ (int)event->x_root,
+ (int)event->y_root);
if (tab_clicked >= 0)
{
before_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook));
@@ -2969,7 +2971,9 @@ notebook_button_press_cb (GtkWidget *widget,
(event->state & gtk_accelerator_get_default_mod_mask ()) != 0)
return FALSE;
- tab_clicked = find_tab_num_at_pos (notebook, event->x_root, event->y_root);
+ tab_clicked = find_tab_num_at_pos (notebook,
+ (int)event->x_root,
+ (int)event->y_root);
if (tab_clicked < 0)
return FALSE;