Fix DaVinci Resolve focus lock
Fixes #5887.
DaVinci Resolve should still float under XWayland, but applying stay_focused to every Resolve window prevents focusing other apps and monitors while Resolve is open.
This narrows the default rule to keep Resolve floating without globally locking focus.
Tested:
lua -e 'assert(loadfile("default/hypr/apps/davinci-resolve.lua"))'bash test/omarchy-cli-test.sh
CC @28allday
will take a look
here we go
Tested on omarchy 4.0.0.alpha (Hyprland-in-Lua) — the focus / cursor lock is gone ✅.
One thing worth catching before merge: float = true is applied to every Resolve window including the main editor, so it can no longer tile-split with another app. That breaks drag-and-drop of media from Nautilus → Resolve's timeline / Media Pool (common workflow, no visible drag source when Resolve fills the workspace).
Single-rule fix — drop-in replacement for default/hypr/apps/davinci-resolve.lua, supersedes this PR (keeps the stay_focused drop and the anchored class match, adds a title negative-lookahead so the main editor tiles, and center = true so off-screen dialogs from old monitor layouts come back on-screen):
-- DaVinci Resolve dialog focus handling.
-- Float Resolve's secondary windows (Project Manager, project/render
-- settings, save/open dialogs, etc.) so they don't tile and trap focus.
-- The main editor window is intentionally excluded so it can tile and
-- share the workspace with other apps (e.g. a file manager). The
-- negative-lookahead title pattern is the cleanest way to do this in a
-- single rule and avoids the float-vs-tile precedence issue you hit when
-- two separate class-only and class+title rules try to override each
-- other. center = true is required because Resolve restores its
-- last-known window coordinates per-display, which can place dialogs
-- off-screen when the monitor layout has since changed.
o.window(
{ class = "^[Rr]esolve([.]bin)?$", title = "^(?!DaVinci Resolve( Studio)? - )" },
{ float = true, center = true }
)
Verified on dual monitor (eDP-1 + HDMI-A-1) with both Resolve free and Resolve Studio — main editor tiles, Project Manager / Project Settings float
- center, no cursor pinning, drag-and-drop from Nautilus to the timeline works.
yeah that will work as well nice
@dhh @28allday changes have been made, kept it a single rule as you mentioned, switched to using Hyprland's supported negate regex syntax. the main window should now be able to tile normally while still keeping the secondary/dialog window(s) floating, and added the center property so dialogs don't reopen off screen.
Hello, how have you achieved to get it working ? I tried putting the code on hyprland.lua file, but it didn't work. Maybe I'm missing something...
sorry for delay i had to spin up another machine to have look ,my work machine is locked on 3.8 ...however i can,t get that machine on the Dev channel to pick up the 4 alpha at the moment so when i can i,ll take another look
Hello, how have you achieved to get it working ? I tried putting the code on hyprland.lua file, but it didn't work. Maybe I'm missing something...
so you should be on the 4 alpha if you go here
/home/(your user name)/.local/share/omarchy/default/hypr/apps/davinci-resolve.lua
you will see
-- DaVinci Resolve dialog focus handling. o.window(".[Rr]esolve.", { float = true, stay_focused = true })
change that to
-- DaVinci Resolve dialog focus handling. o.window({ class = "^[Rr]esolve([.]bin)?$", title = "negative:^DaVinci Resolve( Studio)? - " }, { float = true, center = true })
Note this lives under ~/.local/share/omarchy/ (the Omarchy source/defaults), so an
Omarchy update could overwrite it. For a persistent personal override, the usual place
is your own ~/.config/hypr/ config.
@28allday @dhh any next steps needed?