Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset adjust mode when hiding inputbar #588

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

9ary
Copy link
Contributor

@9ary 9ary commented Jun 5, 2024

Zathura sets a special adjust mode before showing the inputbar. Remaining in that mode after it has been hidden breaks things like rotation, so reset to none.

Zathura sets a special adjust mode before showing the inputbar.
Remaining in that mode after it has been hidden breaks things like
rotation, so reset to none.
@jdujava
Copy link
Contributor

jdujava commented Jul 10, 2024

Woudn't it be nice to restore the adjust mode to the value before entering the inputbar?
As of now, the original adjust mode is lost on every search or inputbar action.

@9ary
Copy link
Contributor Author

9ary commented Jul 10, 2024

Yeah, I've thought of this too. This technically isn't a regression since the inputbar was leaving the adjust mode in a broken state before.

I was under the impression that hiding the index did the same thing, but it actually only does it when the adjust mode was inputbar:

zathura/zathura/shortcuts.c

Lines 1245 to 1248 in b794eb2

/* zathura goes to the first page when toggling index mode if this isn't done */
if (adjust_mode == ZATHURA_ADJUST_INPUTBAR) {
zathura_document_set_adjust_mode(zathura->document, ZATHURA_ADJUST_NONE);
}

I guess this could be cleaned up, and the adjust mode can be restored.

@jdujava
Copy link
Contributor

jdujava commented Jul 10, 2024

Yeah, I've thought of this too. This technically isn't a regression since the inputbar was leaving the adjust mode in a broken state before.

Exactly, this PR seemed to go in the direction of improving this behavior, hence my suggestion.

Copy link
Member

@sebastinas sebastinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please implement the changes mentioned by @jdujava.

@9ary
Copy link
Contributor Author

9ary commented Aug 25, 2024

Sorry, I stopped using Zathura due to growing frustration with some less trivial bugs. I think it'd be best if someone else picked up this patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants