Commit 62d6bdf7 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Add 'dbus-raise-window' setting

Certain D-Bus commands (e.g., all those from SyncTex) cause zathura's
window to be raised. However, this causes some workflows such as with
IDEA's texify with continuous auto-build to be problematic.
parent dcaf4c67
Pipeline #366 passed with stages
in 2 minutes and 12 seconds
......@@ -616,6 +616,13 @@ zathura
* Value type: Boolean
* Default value: true
*dbus-raise-window*
Defines whether zathura's window should be raised when receiving certain
commands via D-Bus.
* Value type: Boolean
* Default value: true
*filemonitor*
Defines the file monitor backend used to check for changes in files. Possible
values are "glib", "signal" (if signal handling is supported), and "noop". The
......
......@@ -288,6 +288,7 @@ config_load_default(zathura_t* zathura)
girara_setting_add(gsession, "synctex-editor-command", "", STRING, false, _("Synctex editor command"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "dbus-service", &bool_value, BOOLEAN, false, _("Enable D-Bus service"), NULL, NULL);
girara_setting_add(gsession, "dbus-raise-window", &bool_value, BOOLEAN, false, _("Raise window on certain D-Bus commands"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "continuous-hist-save", &bool_value, BOOLEAN, false, _("Save history at each page change"), NULL, NULL);
girara_setting_add(gsession, "selection-clipboard", "primary", STRING, false, _("The clipboard into which mouse-selected data will be written"), NULL, NULL);
......
......@@ -436,7 +436,11 @@ handle_method_call(GDBusConnection* UNUSED(connection),
(*handlers[idx].handler)(priv->zathura, parameters, invocation);
if (handlers[idx].present_window == true && priv->zathura->ui.session->gtk.embed == 0) {
gtk_window_present(GTK_WINDOW(priv->zathura->ui.session->gtk.window));
bool present_window = true;
girara_setting_get(priv->zathura->ui.session, "dbus-raise-window", &present_window);
if (present_window == true) {
gtk_window_present(GTK_WINDOW(priv->zathura->ui.session->gtk.window));
}
}
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment