(state string)
| 2104 | } |
| 2105 | |
| 2106 | func (wb *WindowBase) WriteState(state string) error { |
| 2107 | settings := App().Settings() |
| 2108 | if settings == nil { |
| 2109 | return newError("App().Settings() must not be nil") |
| 2110 | } |
| 2111 | |
| 2112 | p := wb.path() |
| 2113 | if strings.HasPrefix(p, "/") || |
| 2114 | strings.HasSuffix(p, "/") || |
| 2115 | strings.Contains(p, "//") { |
| 2116 | |
| 2117 | return nil |
| 2118 | } |
| 2119 | |
| 2120 | return settings.PutExpiring(p, state) |
| 2121 | } |
| 2122 | |
| 2123 | func windowFromHandle(hwnd win.HWND) Window { |
| 2124 | if wb := hwnd2WindowBase[hwnd]; wb != nil { |
no test coverage detected