summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-27 16:16:54 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-27 16:17:32 (EDT)
commit63da6387f04743f2509e16e3cc212b7ef6e9aca8 (patch)
treeab6f4b7f41c24a65c96d25dccece995c9c1eef54
parent62a56e73f2924297278150e979effafcafde0725 (diff)
downloadmarquee-63da6387f04743f2509e16e3cc212b7ef6e9aca8.zip
marquee-63da6387f04743f2509e16e3cc212b7ef6e9aca8.tar.gz
marquee-63da6387f04743f2509e16e3cc212b7ef6e9aca8.tar.bz2
MqTab: Don't save favicon surface
-rw-r--r--src/tab.c10
-rw-r--r--src/tab.h1
2 files changed, 6 insertions, 5 deletions
diff --git a/src/tab.c b/src/tab.c
index 3304bd0..a29c64d 100644
--- a/src/tab.c
+++ b/src/tab.c
@@ -28,9 +28,9 @@
#include "tab-body.h"
static void
-update_tab_image(MqTab *tab)
+update_tab_image(MqTab *tab, cairo_surface_t *favicon)
{
- gtk_image_set_from_surface(GTK_IMAGE(tab->tab_image), tab->favicon);
+ gtk_image_set_from_surface(GTK_IMAGE(tab->tab_image), favicon);
}
static void
@@ -284,8 +284,10 @@ static void
favicon_cb(WebKitWebView __attribute__((unused)) *web_view,
GParamSpec __attribute__((unused)) *paramspec, MqTab *tab)
{
- tab->favicon = webkit_web_view_get_favicon(tab->web_view);
- update_tab_image(tab);
+ cairo_surface_t *favicon;
+
+ favicon = webkit_web_view_get_favicon(tab->web_view);
+ update_tab_image(tab, favicon);
}
static void
diff --git a/src/tab.h b/src/tab.h
index b5ff654..7e3c379 100644
--- a/src/tab.h
+++ b/src/tab.h
@@ -47,7 +47,6 @@ struct MqTab {
GtkWidget *tab;
GtkWidget *tab_image;
GtkWidget *tab_label;
- cairo_surface_t *favicon;
const gchar *title;
WebKitWebView *web_view;
GtkWidget *popover;