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

Focus application on overlay layer doesn't turn back to it when parent windows are closed #1120

Open
stefonarch opened this issue Feb 11, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@stefonarch
Copy link

stefonarch commented Feb 11, 2025

System Information

  • niri 25.01 (v0.1.10-349-g20769b4c)
  • Distro: arch

In Qterminal git "Preferences" and "fontdialog" windows open on the overlay layer too, as qterminal dropdown mode does, using F12 { spawn "qterminal" "-d"; }.

When closing the font dialog focus should go back to "Preferences" but goes to the underlying top level window, same when closing "Preferences" dialog: focus should go back to the dropdown terminal.

Even when focus-follows-mouse max-scroll-amount="0%" is enabled this happens, terminal needs a click to get back focus.

Probably not many applications are on overlay windows, it looks like only kwin and hyprland get that focus handling right.

@stefonarch stefonarch added the bug Something isn't working label Feb 11, 2025
@YaLTeR
Copy link
Owner

YaLTeR commented Feb 11, 2025

So they open on layer-shell with on-demand focus? Yeah, niri doesn't currently keep the focus chain for layer-shell surfaces. I'll need to think of a way to implement it.

@YaLTeR YaLTeR added enhancement New feature or request and removed bug Something isn't working labels Feb 11, 2025
@stefonarch
Copy link
Author

Not really a chain of overlay layers - the previous surface is temporarily set to the top layer, so only the most recent config window is on the overlay layer.

Like qterminal → Preferences → Set font is

  Top layer:
    Surface:
      Namespace: "dialog"
      Keyboard interactivity: on-demand

    Surface:
      Namespace: "dropdown_terminal"
      Keyboard interactivity: on-demand

  Overlay layer:
    Surface:                                                                                     
      Namespace: "dialog"                                                                        
      Keyboard interactivity: on-demand                                                          

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

No branches or pull requests

2 participants