Skip to content

Conversation

HelloWorld017
Copy link

@HelloWorld017 HelloWorld017 commented Sep 26, 2025

Summary

Sends AppMsg::Show right after connect_map, as there is some time-delay between window.show() and connect_enter_monitor, creating visual artifacts.

Motivation

#262

Screenrecords

Screenrecord_2025-09-27_02-08-20.mp4

@eilvelia
Copy link

I confirm that this fixes my issue

@HelloWorld017 HelloWorld017 marked this pull request as ready for review September 26, 2025 17:10
@Kirottu
Copy link
Collaborator

Kirottu commented Sep 27, 2025

This feels quite hacky, I may have come up with a more reasonable solution in the fix/map-flicker branch. Can you try that one out?

@HelloWorld017
Copy link
Author

Sadly not working.. 😢

Screenrecord_2025-09-28_01-43-55.mp4

@Kirottu
Copy link
Collaborator

Kirottu commented Sep 27, 2025

Well that's suboptimal, since I'm pretty sure obtaining the monitor in the map callback will not return the actual monitor since that problem is what I was dealing with before. It may work for single monitor setups or with monitor setups where they have identical scale and resolution, but I don't think it should work for different monitor setups.

I could be wrong on this one, but that needs some testing. I also have a few more ideas I'll be tinkering with soon, and will let you know when I have something you can try.

@Kirottu
Copy link
Collaborator

Kirottu commented Sep 28, 2025

Alright, another commit is in on the aforementioned branch. Hopefully it should make it so that when the window is mapped initially it appears in the middle of the screen which should make animations considerably less jarring.

@eilvelia
Copy link

Well, in my case there's no animation, so it still looks pretty annoying, although not as much as it did in the corner.

2025-09-28.16-00-20.mp4

@Kirottu
Copy link
Collaborator

Kirottu commented Sep 29, 2025

I have yet again pushed another hopeful fix to this issue to the aforementioned branch.

@eilvelia
Copy link

eilvelia commented Sep 29, 2025

The window is larger but still appears in the center. Also looks like the window is now invisible if the config has not been found.

2025-09-29.15-18-15.mp4

@Kirottu
Copy link
Collaborator

Kirottu commented Sep 29, 2025

What is your compositor? I really don't understand what is going wrong since the code should make the main content visible only after the layer shell margins and anchors are set up, but instead it seems like on your compositor the layer shell margins and anchors are only applied slightly after the content was made visible.

@eilvelia
Copy link

It's Sway.

@Kirottu
Copy link
Collaborator

Kirottu commented Oct 2, 2025

After some investigation, it seems like Anyrun not appearing at all on your system is likely a Sway issue, so I've opened an issue for that. I don't know if a workaround is possible for this that would cause resolve the visual flicker, and I'm kinda playing in the dark since I can't reproduce it well. If you have rust/GTK knowledge I would appreciate if you could test this further with different ways of hiding content before the correct monitor has been determined.

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