Repository navigation
Allow the microphone, camera and notifications for Discord's page - #3
Merged
Merged
Conversation
WebView2 has no window.webkit.messageHandlers, so the page's host messages were dropped on Windows and the page never reported ready. The bridge now uses window.chrome.webview there, and keeps webkit on Linux. The page script could also run before the document had a body, when the navigation completed, and then failed on documentElement. It now waits for DOMContentLoaded in that case. The window opens on a loading page, which reports ready at once and then moves on to Discord, so the window appears straight away. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
WebViewWindow now draws the resize strips along the edges when resizeEdges is set, so the page no longer draws its own zones or posts resizeDrag.
The window shows Discord's icon in the taskbar and the system tray. The title bar has a button that opens a dialog with a tick box: ticked keeps the window in the taskbar when minimised, unticked hides it to the tray. The choice is saved in the settings folder. The page no longer draws its own resize zones, since the library draws them.
The settings dialog has an Updates section, with Check for update and Update now. The bar's Update available notice opens it. An update downloads the release file for this platform, checks it against the SHA-256 GitHub publishes, puts it in place of the running program, and starts the new copy. A failed download or checksum leaves the installed program unchanged. Leftovers from an update are removed when the program next starts.
The settings dialog is now a separate window, opened from the title bar or the update notice. Downloads and installs run behind a progress window with a cancel button, which stops the download part way through. Discord loads directly in its window, under a loading window that closes once Discord has drawn its app, so the page no longer loads twice. The page reports ready once its app is drawn, with a 30-second limit. The program's windows and what they share are in Application.cpp.
The page's permission requests now go to onPermissionRequest in the window, which allows the microphone, camera and notifications for discord.com and its subdomains over https. Other sites and other kinds keep the platform's default. The decision is in PagePermissions, which has unit tests behind DW_BUILD_TESTS. docs/MISSING_FEATURES.md lists the desktop bridge features this program still lacks, with their status and the plan for them. This needs the WebViewWindow change that adds onPermissionRequest. CI checks WebViewWindow out from its main branch, so this doesn't build there until that change is merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The page's permission requests now go to `onPermissionRequest` in the window, which allows the microphone, camera and notifications for discord.com and its subdomains over https. Other sites and other permission kinds keep the platform's default. The decision lives in `PagePermissions`, with unit tests behind `DW_BUILD_TESTS`.
`docs/MISSING_FEATURES.md` lists the desktop bridge features this program still lacks, with status and plan.
Depends on gwdevhub/WebViewWindow#6, which adds `onPermissionRequest`. CI checks WebViewWindow out from `main`, so this won't build there until #6 merges. Merging #6 first.
🤖 Generated with Claude Code