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

When input method panel becomes shorter, the shortened region is still visible #2539

Open
lilydjwg opened this issue Dec 19, 2024 · 13 comments · May be fixed by #2547
Open

When input method panel becomes shorter, the shortened region is still visible #2539

lilydjwg opened this issue Dec 19, 2024 · 13 comments · May be fixed by #2547
Labels

Comments

@lilydjwg
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Enable plugin input-method-v1
  2. Find a text field and start typing using input method
  3. When input method panel becomes shorter (but not moved), the shortened region is still visible

Expected behavior
The shortened region should disappear and whatever was below is now showing.

Screenshots or stacktrace

https://github.com/user-attachments/assets/19d8f7c3-4dc6-4101-ac85-7d7cd60b718d
(It's better to download the screencast and view frame by frame.)

Wayfire version
git

@lilydjwg lilydjwg added the bug label Dec 19, 2024
@ammen99
Copy link
Member

ammen99 commented Dec 19, 2024

Is this a regression? I think it was working well previously. I vaguely remember something about wlroots changing something about damage accumulation ...

@lilydjwg
Copy link
Contributor Author

Yes, it's a regression.

@soreau
Copy link
Member

soreau commented Dec 25, 2024

As ammen99 realized on chat, there was a breaking change we did not account for in the wlroots 0.18 port: "wlr_surface_get_effective_damage() no longer takes into account resizes and sub-surfaces." So, does this patch help?

@lilydjwg
Copy link
Contributor Author

That patch fixes it for the most of time (e.g. the issue demonstrated in above video), but it still occurs occasionally and in specific situation.

It still happens in Telegram.

This seems to only happen when xfce4-appfinder is displayed above the wallpaper:

out.mp4

Firefox & GNOME Terminal is constantly repainting (using the showrepaint plugin) so it doesn't happen, but constantly repainting is an issue.

@soreau
Copy link
Member

soreau commented Dec 26, 2024

Actually, that patch is not the right fix at all. Apparently it requires additional work, but so far, I haven't found a proper solution. But, thanks for testing, and if I find something else that might work, I'll post it here.

@lilydjwg
Copy link
Contributor Author

Firefox & GNOME Terminal is constantly repainting (using the showrepaint plugin) so it doesn't happen, but constantly repainting is an issue.

Reverting the patch, GNOME Terminal is back to repaint when necessary, but Firefox is still repainting constantly. Maybe it's a change in Firefox's side. Despite this, without this patch the total power usage drops from 100W to 85W (the application window being displayed doesn't change it).

@soreau
Copy link
Member

soreau commented Dec 26, 2024

This patch fixes the issue here, and it seems like a fix closer to the problem.

@lilydjwg
Copy link
Contributor Author

It almost fixes the issue! Except when the cursor is near the right screen border and the input window was pushed to the left but then shrinks (so it now isn't pushed to the left).

out.mp4

BTW it seems that Firefox did something that has changed its repainting behavior, but nothing bad is happening.

@soreau
Copy link
Member

soreau commented Dec 26, 2024

It almost fixes the issue! Except when the cursor is near the right screen border and the input window was pushed to the left but then shrinks (so it now isn't pushed to the left).

Hm, might this be an unrelated problem? Here, when the text cursor is near the right edge, the popup's right edge is aligned with the right edge of the output, and pushed left as expected. So I cannot reproduce this issue currently. The patch fixes damage specifically, and it shouldn't change anything with offset/positioning, as far as I know.

@lilydjwg
Copy link
Contributor Author

The positioning is correct, but part of an old frame is still visible after it repositions (all containing text to the left side of "1." shouldn't be there; I forgot to use mouse to "remove" those artifacts in the video).

@soreau
Copy link
Member

soreau commented Dec 26, 2024

Does this variant happen to help?

@soreau
Copy link
Member

soreau commented Dec 26, 2024

Hm, I probably shouldn't overwrite the global geometry .. this patch should do better.

@lilydjwg
Copy link
Contributor Author

Yes! Last patch has no issue so far!

soreau added a commit that referenced this issue Dec 26, 2024
@soreau soreau linked a pull request Dec 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants