mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-05 07:00:39 +08:00
[windows] Fix #2359 by not redirecting the accelerators to wndproc
If someone wants to handle accelerators they could use the key bindings in a cross-platform way.
This commit is contained in:
parent
2f3eb70a4d
commit
012eeab3aa
@ -1322,13 +1322,7 @@ func (w *windowsWebviewWindow) setupChromium() {
|
|||||||
chromium.WebResourceRequestedCallback = w.processRequest
|
chromium.WebResourceRequestedCallback = w.processRequest
|
||||||
chromium.ContainsFullScreenElementChangedCallback = w.fullscreenChanged
|
chromium.ContainsFullScreenElementChangedCallback = w.fullscreenChanged
|
||||||
chromium.NavigationCompletedCallback = w.navigationCompleted
|
chromium.NavigationCompletedCallback = w.navigationCompleted
|
||||||
chromium.AcceleratorKeyCallback = func(vkey uint) bool {
|
chromium.AcceleratorKeyCallback = w.processKeyBinding
|
||||||
if w.processKeyBinding(vkey) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
w32.PostMessage(w.hwnd, w32.WM_KEYDOWN, uintptr(vkey), 0)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
chromium.Embed(w.hwnd)
|
chromium.Embed(w.hwnd)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user