diff --git a/callbacks.c b/callbacks.c index af6a699..5389cc2 100644 --- a/callbacks.c +++ b/callbacks.c @@ -50,7 +50,8 @@ cb_buffer_changed(girara_session_t* session) } static void -update_visible_pages(zathura_t* zathura) { +update_visible_pages(zathura_t* zathura) +{ const unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura->document); for (unsigned int page_id = 0; page_id < number_of_pages; page_id++) { @@ -539,6 +540,11 @@ cb_page_widget_text_selected(ZathuraPage* page, const char* text, void* data) g_return_if_fail(data != NULL); zathura_t* zathura = data; + girara_mode_t mode = girara_mode_get(zathura->ui.session); + if (mode != zathura->modes.normal && mode != zathura->modes.fullscreen) { + return; + } + GdkAtom* selection = get_selection(zathura); /* copy to clipboard */ diff --git a/dbus-interface.c b/dbus-interface.c index 00f96c0..eeee0f4 100644 --- a/dbus-interface.c +++ b/dbus-interface.c @@ -483,8 +483,8 @@ zathura_dbus_goto_page_and_highlight(const char* filename, unsigned int page, } GError* error = NULL; - GDBusConnection* connection = g_bus_get_sync(G_BUS_TYPE_SESSION, - NULL, &error); + GDBusConnection* connection = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, + &error); if (connection == NULL) { girara_error("Could not connect to session bus: %s", error->message); g_error_free(error); diff --git a/shortcuts.c b/shortcuts.c index 0f5c807..91f17db 100644 --- a/shortcuts.c +++ b/shortcuts.c @@ -1242,7 +1242,7 @@ sc_toggle_fullscreen(girara_session_t* session, girara_argument_t* girara_mode_set(session, zathura->modes.fullscreen); } - fullscreen = fullscreen ? false : true; + fullscreen = !fullscreen; return false; } @@ -1315,7 +1315,7 @@ sc_toggle_presentation(girara_session_t* session, girara_argument_t* girara_mode_set(session, zathura->modes.presentation); } - fullscreen = fullscreen ? false : true; + fullscreen = !fullscreen; return false; }