Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Restore application window on notification click #640

Merged
merged 2 commits into from Aug 22, 2018

Conversation

sissbruecker
Copy link
Contributor

There currently is an issue where the nativefied application does not respond to clicking on a desktop notification. You would expect it to restore and focus its window, but that doesn't work if:

  • The window is minimized
  • There is no open window (macOS)

See #221 and possibly #396.

This PR fixes that by adding a click handler to each notification. When clicking the notification the Electron app restores and focuses the main window using BrowserWindow.show(). This seems to handle both cases (restore minimized window / open new window, then focus window).

@awerlang awerlang mentioned this pull request Aug 1, 2018
@ronjouch
Copy link
Contributor

@sissbruecker makes sense, thanks! Merging.

@ronjouch ronjouch merged commit 27ea3fc into nativefier:master Aug 22, 2018
Adam777Z pushed a commit to Adam777Z/nativefier that referenced this pull request Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants