Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI not coming into focus after clicking on notification while in background #465

Closed
oakenhold opened this issue Jun 1, 2017 · 2 comments
Labels

Comments

@oakenhold
Copy link

Description

The main GUI window does not come back into focus after clicking on notification. This only happens if the window is in the background (not minimized). When I specifically minimized the window and click on a notification, the window will come back into focus.

Expected / Actual behavior

Expected behavior is for the window to come back into focus after clicking on the notification.

Reproduction steps

  1. Open Streamlink Twitch GUI, and then open another program which will become the active window in focus.
  2. Click on notification alert
  3. Streamlink Twitch GUI should be brought back into focus as the active window.

Environment details (operating system, etc.)

Windows 10 64bit
streamlink-twitch-gui 1.3.1
Notification type: Automatic selection (notifications appear as Windows native notifications)
Notification click: Go to favorites
Restore GUI: Enabled

@oakenhold oakenhold changed the title GUI not coming into focus after clicking on notification GUI not coming into focus after clicking on notification while in background Jun 1, 2017
@bastimeyer
Copy link
Member

This is a regression of 364dad5.

There are a couple of issues in NW.js' nwWindow.restore() method, which is responsible for unminimizing and unmaximizing the window. It's not supposed to also focus the window, but has always done so as a side effect. The main issue though is that it sets the window position and size to their default values when the window is not maximized or minimized. That's why I changed the logic of the nwWindow wrapper module, so that it is aware of the current window state and doesn't call restore() if it's not necessary.

What's required here to fix the issue is to also call focus() on a notification click...

@oakenhold
Copy link
Author

Yup, I think it is a logical interaction to have the window back in focus after a notification click.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants