hypr/apps: stop DaVinci Resolve's dialogs trapping the pointer - #6430
Closed
28allday wants to merge 1 commit into
Closed
hypr/apps: stop DaVinci Resolve's dialogs trapping the pointer#643028allday wants to merge 1 commit into
28allday wants to merge 1 commit into
Conversation
stay_focused is currently set on every Resolve window. It is needed for Resolve's transient popups, which close on mouse-out without it (hyprwm/Hyprland#12235), but pinning the windows those popups open over makes two windows fight for focus: Hyprland flips between them and the dialog can't be dismissed until Resolve is killed. Unpin the two parent windows only, so at most one pinned window is ever visible.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR narrows Hyprland’s DaVinci Resolve stay_focused window rule to prevent focus oscillation between multiple visible Resolve windows (which can trap the pointer), while preserving the original workaround needed to keep transient popups from closing on mouse-out.
Changes:
- Keep the existing blanket Resolve rule (float + full opacity +
stay_focused) for compatibility with transient popup behavior. - Add a more specific, later rule to disable
stay_focusedonly for the two parent windows (DaVinci Resolve - <project>andProject Manager) so only the child dialogs remain pinned.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symptom
Opening certain DaVinci Resolve windows — confirmed with Preferences and Project Manager — traps the pointer. The dialog cannot be dismissed and no other window can be clicked. Quitting Resolve entirely is the only way out.
Root cause
default/hypr/apps/davinci-resolve.luasetsstay_focused = trueon.*[Rr]esolve.*— that is, on every Resolve window.That rule is there for a real reason and must not simply be deleted. Resolve is not Wayland-native, so Hyprland misreads its transient popups (Change Clip Duration, Normalize Audio Levels, …) and they close the moment the pointer leaves them unless focus is pinned. See hyprwm/Hyprland#12235, where the
stayfocusedworkaround originates.The bug is that it is applied too broadly.
stayfocusedforces focus onto a window while it is visible. When two Resolve windows are visible at once, both demand focus and neither yields, so Hyprland flips between them indefinitely.Captured live, sampling
hyprctl activewindowevery 0.4s, with the Project Manager and its own child dialog both open:Focus oscillates between the two. Neither can be acted on, which is exactly what "the mouse is captured" looks like from the user's side.
Fix
Keep the pin where it is needed — the transient popups — and remove it from the windows those popups open over. At most one pinned window is then ever visible, so nothing can fight.
The two parent windows are the main window and the Project Manager:
DaVinci Resolve - <project>Project ManagerPreferences,Create New Project, transient popupsThis is a narrowing, not a removal: every window that previously relied on
stay_focusedto stay open still has it.Verification
Hyprland 0.56.1 / Omarchy 4.0.0.r1440, NVIDIA, 2560×1440 logical, DaVinci Resolve 21.0.3.
The override mechanism is confirmed. A later, more specific rule does beat an earlier blanket one, tested in isolation with a throwaway class so nothing about Resolve could confound it:
The trap is confirmed removed, by cold-start A/B. Resolve was started fresh twice — once with the fix, once with only the
stay_focusedexclusion removed, so the exclusion was the sole variable. In each run Resolve was focused, focus was then dispatched to another window, and the actual focus owner sampled 12 times at 0.5s intervals:The control matters: it demonstrates the test can actually detect the trap, so run A's result is meaningful rather than vacuous. Both runs exercised the Project Manager, one of the two windows the rule excludes and one of the two originally reported.
The main window and the popups were then confirmed by hand. Resolve always requires a project to be selected from the Project Manager before the main window opens, so these two checks cannot be automated:
The second row is the one that matters most: it is the behaviour
stay_focusedexists to protect, and it survives the narrowing intact.Known limitations / open questions
DaVinci Resolve - <project>andProject Managerare excluded. If another Resolve window can itself parent a dialog (Project Settings and the Deliver page are the likely candidates), it would reintroduce the trap and need adding to the alternation.input:mouse_refocus, and #12235 notesmouse_refocus = 0as an alternative tostayfocusedentirely. On 0.56.1 the underlying popup bug may even be fixed, which would make the wholestay_focusedrule obsolete. I did not test that here becausemouse_refocusis a global input setting, not a per-window rule, so flipping it for every Omarchy user is a much larger decision than this narrowing. Worth a maintainer's opinion.stayfocused, but "child windows become inaccessible when the main panel is clicked" is consistent with this root cause, so this may resolve it.