Skip to content

Fix overview search field and right sidebar losing focus#2838

Merged
end-4 merged 6 commits intoend-4:mainfrom
altrup:fix-search-focus-loss
Feb 7, 2026
Merged

Fix overview search field and right sidebar losing focus#2838
end-4 merged 6 commits intoend-4:mainfrom
altrup:fix-search-focus-loss

Conversation

@altrup
Copy link
Contributor

@altrup altrup commented Jan 7, 2026

Describe your changes

  • Only time that I observe it consistently losing focus is when you hover over the bar and have a popup open
  • If overview loses focus (i.e to another window or panel), then persistent panels will be force unfocused using HyprlandFocusGrab
  • Also adds WlrLayershell.OnDemand on overview and right sidebar

Is it ready? Questions/feedback needed?

  • Does work, though it is kind of a workaround

@altrup altrup changed the title Fix overview search occasionally losing focus Fix overview search field losing focus Jan 7, 2026
@narendnp
Copy link
Contributor

narendnp commented Jan 7, 2026

+1 This PR is able to fix the issue.

@unixr77
Copy link

unixr77 commented Jan 8, 2026

+1 Fixed focus issue same as wallpaper selector

@An-dz
Copy link
Contributor

An-dz commented Jan 8, 2026

Fixes #2833

@unixr77
Copy link

unixr77 commented Jan 9, 2026

@altrup

Overview loses focus again if the right or left panel is active.

here video

recording_2026-01-09_14.20.53.mp4

@altrup
Copy link
Contributor Author

altrup commented Jan 9, 2026

@altrup

Overview loses focus again if the right or left panel is active.

here video
recording_2026-01-09_14.20.53.mp4

Uncommenting WlrLayershell.keyboardFocus: GlobalStates.overviewOpen ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None seems to fix it, but I'm not sure why it was commented out initially, so might be reintroducing an old bug

@unixr77
Copy link

unixr77 commented Jan 10, 2026

@altrup
Overview loses focus again if the right or left panel is active.
here video
recording_2026-01-09_14.20.53.mp4

Uncommenting WlrLayershell.keyboardFocus: GlobalStates.overviewOpen ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None seems to fix it, but I'm not sure why it was commented out initially, so might be reintroducing an old bug

It works, but I found another focus problem.
If the left panel or overview is active open the right panel and try to add a new todo, I experience a focus problem.

here video

recording_2026-01-10_10.25.26.mp4

@altrup altrup changed the title Fix overview search field losing focus Fix overview search field and right sidebar losing focus Jan 10, 2026
@altrup
Copy link
Contributor Author

altrup commented Jan 10, 2026

Adding a similar line to SidebarRight.qml seems to fix the issue with todo tasks (WlrLayershell.keyboardFocus: GlobalStates.sidebarRightOpen ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None)

I will also note that the hasActive workaround doesn't seem to be necessary after adding keyboardFocus to everything, but it does fix a few small edge cases so I'll just leave it for now

@unixr77
Copy link

unixr77 commented Jan 10, 2026

Adding a similar line to SidebarRight.qml seems to fix the issue with todo tasks (WlrLayershell.keyboardFocus: GlobalStates.sidebarRightOpen ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None)

I will also note that the hasActive workaround doesn't seem to be necessary after adding keyboardFocus to everything, but it does fix a few small edge cases so I'll just leave it for now

I applied the fix and everything seemed fine and I couldn't see any problems. solved thanks.

@unixr77
Copy link

unixr77 commented Jan 12, 2026

@altrup Updating GlobalFocusGrab.qml file prevents cheatsheet from opening and causes delay..

@altrup
Copy link
Contributor Author

altrup commented Jan 12, 2026

@unixr77 does the latest change fix it for you? (windows: root.dismissable.every(w => !w?.focusable) || root.dismissable.some(w => hasActive(w?.contentItem)) ? [...root.dismissable, ...root.persistent] : [...root.dismissable])

@unixr77
Copy link

unixr77 commented Jan 12, 2026

@unixr77 does the latest change fix it for you? (windows: root.dismissable.every(w => !w?.focusable) || root.dismissable.some(w => hasActive(w?.contentItem)) ? [...root.dismissable, ...root.persistent] : [...root.dismissable])

yes, solved

@unixr77
Copy link

unixr77 commented Jan 12, 2026

@altrup
after apply 94490f3 focus loses again on walpaper selection screen

@altrup
Copy link
Contributor Author

altrup commented Jan 12, 2026

@unixr77 should be fixed

@unixr77
Copy link

unixr77 commented Jan 12, 2026

@unixr77 should be fixed

solved thanks!

@end-4
Copy link
Owner

end-4 commented Feb 7, 2026

thank you

@end-4 end-4 merged commit 09d5817 into end-4:main Feb 7, 2026
@end-4 end-4 linked an issue Feb 7, 2026 that may be closed by this pull request
5 tasks
@clsty clsty mentioned this pull request Feb 7, 2026
5 tasks
@clsty clsty mentioned this pull request Feb 7, 2026
5 tasks
@altrup altrup deleted the fix-search-focus-loss branch February 7, 2026 17:02
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.

Can't write into application search when mouse in on top of the bar

5 participants