mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 06:46:00 +01:00
disable adjustment callbacks in index mode
Otherwise the document object gets updated with wrong position values, because the adjustment belong to the index, not the document view.
This commit is contained in:
parent
3634636227
commit
018e026e62
1 changed files with 20 additions and 0 deletions
20
callbacks.c
20
callbacks.c
|
@ -92,6 +92,11 @@ cb_view_hadjustment_value_changed(GtkAdjustment* adjustment, gpointer data)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Do nothing in index mode */
|
||||
if (girara_mode_get(zathura->ui.session) == zathura->modes.index) {
|
||||
return;
|
||||
}
|
||||
|
||||
update_visible_pages(zathura);
|
||||
|
||||
double position_x = zathura_adjustment_get_ratio(adjustment);
|
||||
|
@ -113,6 +118,11 @@ cb_view_vadjustment_value_changed(GtkAdjustment* adjustment, gpointer data)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Do nothing in index mode */
|
||||
if (girara_mode_get(zathura->ui.session) == zathura->modes.index) {
|
||||
return;
|
||||
}
|
||||
|
||||
update_visible_pages(zathura);
|
||||
|
||||
double position_x = zathura_document_get_position_x(zathura->document);
|
||||
|
@ -135,6 +145,11 @@ cb_view_hadjustment_changed(GtkAdjustment* adjustment, gpointer data)
|
|||
zathura_adjust_mode_t adjust_mode =
|
||||
zathura_document_get_adjust_mode(zathura->document);
|
||||
|
||||
/* Do nothing in index mode */
|
||||
if (girara_mode_get(zathura->ui.session) == zathura->modes.index) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Don't scroll we're focusing the inputbar. */
|
||||
if (adjust_mode == ZATHURA_ADJUST_INPUTBAR) {
|
||||
return;
|
||||
|
@ -158,6 +173,11 @@ cb_view_vadjustment_changed(GtkAdjustment* adjustment, gpointer data)
|
|||
zathura_adjust_mode_t adjust_mode =
|
||||
zathura_document_get_adjust_mode(zathura->document);
|
||||
|
||||
/* Do nothing in index mode */
|
||||
if (girara_mode_get(zathura->ui.session) == zathura->modes.index) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Don't scroll we're focusing the inputbar. */
|
||||
if (adjust_mode == ZATHURA_ADJUST_INPUTBAR) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue