Skip to content

Fix: defer window visibility until initialization completes - #168

Merged
rharish101 merged 2 commits into
rharish101:mainfrom
aa11653:zzh/fix-unstyled-flashing
Jul 17, 2026
Merged

Fix: defer window visibility until initialization completes#168
rharish101 merged 2 commits into
rharish101:mainfrom
aa11653:zzh/fix-unstyled-flashing

Conversation

@aa11653

@aa11653 aa11653 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Hi rharish101, thank you for developing such a nice DM!

ReGreet currently maps its application window before the asynchronous component initialization has completed. This can briefly expose an unstyled window before the background and custom CSS are applied.

The fixing is quite straight forward. Disable Relm4's automatic visibility-on-activate behavior and show the window explicitly after initialization. The intented focus on login button is maintained through this bug fix.

Tested with:

  • demo mode
  • custom CSS
  • Hyprland (0.55.4-1) + greetd (0.10.3-2) on Arch Linux (kernel 6.18.38-1-lts)

I just replace the /usr/bin/regreet executable and it works well on fresh reboot.

Demo

Before After
before after

|

Reproduce

Run the following command with the minimal configuration on commit b9bc613 (main) -> afff903 (zzh/fix-unstyled-flashing)

path/to/regreet --demo \
  --config ./etc/greetd/regreet.toml \
  --style ./etc/greetd/regreet.css \
  --logs /tmp/regreet-demo.log

etc.tar.gz

@Cryoniq

Cryoniq commented Jul 17, 2026

Copy link
Copy Markdown

Thank you!

@rharish101 I think #45 might be finally fixed. I built ReGreet with these changes and there are no flickers and it even applies GTK theme correctly. Everything seem to work perfectly.
Just in case - i also removed any extra window rules and other things mentioned in that issue discussion.
Tested with the default recommended niri config from the README.md.

regret_test_pr.mp4

@rharish101
rharish101 merged commit db51d1e into rharish101:main Jul 17, 2026
1 check passed
@rharish101

Copy link
Copy Markdown
Owner

Thanks a lot for the fix @aa11653! And thanks for testing @Cryoniq!

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