(hwnd win.HWND, msg uint32, wParam, lParam uintptr)
| 2129 | } |
| 2130 | |
| 2131 | func defaultWndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) (result uintptr) { |
| 2132 | defer func() { |
| 2133 | // FIXME: Rework the panicking publisher so that we don't have to |
| 2134 | // access a private member here. |
| 2135 | if len(App().panickingPublisher.event.handlers) > 0 { |
| 2136 | var err error |
| 2137 | if x := recover(); x != nil { |
| 2138 | if e, ok := x.(error); ok { |
| 2139 | err = wrapErrorNoPanic(e) |
| 2140 | } else { |
| 2141 | err = newErrorNoPanic(fmt.Sprint(x)) |
| 2142 | } |
| 2143 | } |
| 2144 | if err != nil { |
| 2145 | App().panickingPublisher.Publish(err) |
| 2146 | } |
| 2147 | } |
| 2148 | }() |
| 2149 | |
| 2150 | if msg == notifyIconMessageId { |
| 2151 | return notifyIconWndProc(hwnd, msg, wParam, lParam) |
| 2152 | } |
| 2153 | |
| 2154 | wi := windowFromHandle(hwnd) |
| 2155 | if wi == nil { |
| 2156 | return win.DefWindowProc(hwnd, msg, wParam, lParam) |
| 2157 | } |
| 2158 | |
| 2159 | result = wi.WndProc(hwnd, msg, wParam, lParam) |
| 2160 | |
| 2161 | return |
| 2162 | } |
| 2163 | |
| 2164 | type menuer interface { |
| 2165 | Menu() *Menu |
nothing calls this directly
no test coverage detected
searching dependent graphs…