Hermes icon indicating copy to clipboard operation
Hermes copied to clipboard

Feature Request: Bring editor to focus when "dispatching path"

Open rlabrecque opened this issue 2 years ago • 3 comments

Upon clicking a Hermes link, it may be nice to also bring the editor into focus if it's not already.

Clicking an http/s link brings my browser (Firefox) into focus, so this would feel natural I'd think.

Using Hermes: d8cbc9168af589a3afcc7d5e43ff3e18e8e08244 Unreal: UE5.1 OS: Windows 10

rlabrecque avatar May 20 '22 00:05 rlabrecque

Currently it tries to do that, though this is done in the content endpoint specifically, and not for arbitrary URLs. That should probably be hoisted up a level (though there are potentially multiple windows that could be active) to happen for all URLs. (https://github.com/jorgenpt/Hermes/blob/2b99cb8/HermesCore/Source/HermesContentEndpoint/Private/HermesContentEndpoint.cpp#L142)

Are you not seeing that happen for the default content URLs? It's possible it's not working as intended.

jorgenpt avatar May 20 '22 01:05 jorgenpt

This might also be a bug in hermes_urls, in that we might need to add a call to AllowSetForegroundWindow to make HACK_ForceToFront work reliably.

jorgenpt avatar May 20 '22 02:05 jorgenpt

The new hermes_urls version has that call, but it's unclear as to why it's not bringing Unreal to focus -- it does for me. I'm not able to reproduce it not getting focus.

jorgenpt avatar May 25 '22 23:05 jorgenpt