diff --git a/zathura/file-monitor.c b/zathura/file-monitor.c index 4ef9eee..c64c200 100644 --- a/zathura/file-monitor.c +++ b/zathura/file-monitor.c @@ -157,10 +157,6 @@ zathura_filemonitor_new(const char* file_path, return NULL; } - girara_debug("starting file monitor"); - ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(ret); - ZATHURA_FILEMONITOR_GET_CLASS(file_monitor)->start(file_monitor); - - return file_monitor; + return ZATHURA_FILEMONITOR(ret); } diff --git a/zathura/zathura.c b/zathura/zathura.c index 2195871..7fd154e 100644 --- a/zathura/zathura.c +++ b/zathura/zathura.c @@ -898,6 +898,9 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char* } g_signal_connect(G_OBJECT(zathura->file_monitor.monitor), "reload-file", G_CALLBACK(cb_file_monitor), zathura->ui.session); + + girara_debug("starting file monitor"); + zathura_filemonitor_start(zathura->file_monitor.monitor); } if (password != NULL) {