[BUG] GameViewportClient LostFocus and RecievedFocus fail to fire

When extending UGameViewportClient and listening to the LostFocus and RecievedFocus events, both events will not fire when the game window itself changes focus states.

Instead, both events are fired when SLATE widgets gain and lose focus, IE when the console window is activated.

This is not the intended behavior.

Hello

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed set of steps to reproduce this issue on our end?
  3. Could you provide screen shots of any blueprints/ code that may be involved with this issue?

Hey Rudy,

I reproduced the issue in a clean project and uploaded it here: https://dl.dropboxusercontent.com/u/5703980/LostFocusTest.zip

You can reproduce the issue by starting the game as standalone from the editor and double tapping the tilde console key to bring up the full console window. You’ll notice “LOST FOCUS” printed on the screen. However, if you alt-tab from the game window itself, lost focus does not fire and the text is not printed to the screen.

This is all done via C++ by extending GameViewportClient(To override LostFocus) and GameInstance (for a global event broadcast).

Lemme know if you need more information from me, thank you for the prompt response!

–Jon Terp

After opening the project I found that the source file was missing and I was unable to open the project. Could you zip down the project again and make sure to include the Content, Config, Source, and Uproject are included?

Oh no! I used the packaging tool in the editor and I guess it didn’t include source files. That’s weird.

Here’s one with the proper source files: [Removed file link]

Sorry for wasting your time like that! I’ll be more careful in the future.

We were able to reproduce this issue on our end. I have written up a report ( UE-22128) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your information and time.

Make it a great day

Did this fix make its way into 4.10?

Hello

I went ahead and double checked on this issue for you. This issue’s status has not been updated to fixed as of yet. I hope this information helps.

Make it a great day