aboutsummaryrefslogtreecommitdiff
path: root/fastiv.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-11-23 17:12:31 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-11-23 17:13:21 +0100
commitfee901a5901d4bbacbf3ce90bcc3321a5c5e721e (patch)
tree6294de3e9050dc3435aaefc4cb1e22903f0c0558 /fastiv.c
parent7ab1a6d2465dabc37e3e5f751de6e07011ee4b72 (diff)
downloadfiv-fee901a5901d4bbacbf3ce90bcc3321a5c5e721e.tar.gz
fiv-fee901a5901d4bbacbf3ce90bcc3321a5c5e721e.tar.xz
fiv-fee901a5901d4bbacbf3ce90bcc3321a5c5e721e.zip
Improve memory management
Diffstat (limited to 'fastiv.c')
-rw-r--r--fastiv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fastiv.c b/fastiv.c
index 880d91f..5aabd46 100644
--- a/fastiv.c
+++ b/fastiv.c
@@ -425,7 +425,7 @@ on_key_press(G_GNUC_UNUSED GtkWidget *widget, GdkEventKey *event,
switch (event->keyval) {
case GDK_KEY_Escape:
case GDK_KEY_q:
- gtk_main_quit();
+ gtk_widget_destroy(g.window);
return TRUE;
case GDK_KEY_o:
@@ -598,6 +598,7 @@ main(int argc, char *argv[])
gtk_css_provider_load_from_data(provider, style, strlen(style), NULL);
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),
GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref(provider);
g.view_scroller = gtk_scrolled_window_new(NULL, NULL);
g.view = g_object_new(FASTIV_TYPE_VIEW, NULL);