mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[windows] ignore mouse events
This commit is contained in:
@@ -115,6 +115,9 @@ type WebviewWindowOptions struct {
|
||||
|
||||
// KeyBindings is a map of key bindings to functions
|
||||
KeyBindings map[string]func(window *WebviewWindow)
|
||||
|
||||
// IgnoreMouseEvents will ignore mouse events in the window
|
||||
IgnoreMouseEvents bool
|
||||
}
|
||||
|
||||
var WebviewWindowDefaults = &WebviewWindowOptions{
|
||||
|
||||
@@ -179,6 +179,9 @@ func (w *windowsWebviewWindow) run() {
|
||||
exStyle = w32.WS_EX_CONTROLPARENT
|
||||
if options.BackgroundType != BackgroundTypeSolid {
|
||||
exStyle |= w32.WS_EX_NOREDIRECTIONBITMAP
|
||||
if w.parent.options.IgnoreMouseEvents {
|
||||
exStyle |= w32.WS_EX_TRANSPARENT | w32.WS_EX_LAYERED
|
||||
}
|
||||
}
|
||||
if options.AlwaysOnTop {
|
||||
exStyle |= w32.WS_EX_TOPMOST
|
||||
|
||||
Reference in New Issue
Block a user