Mercurial > dwindows
comparison win/edge.cpp @ 2044:b74b9afa31aa
Win: Fix Edge/Chromium HTML widgets in notebook/tabbed widgets not being visible.
When the size event is handled, check that the widget is visible, if not set it.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 25 Nov 2019 03:16:45 +0000 |
parents | 82e5c998df2e |
children | cb195d76de8e |
comparison
equal
deleted
inserted
replaced
2043:82e5c998df2e | 2044:b74b9afa31aa |
---|---|
192 } | 192 } |
193 | 193 |
194 VOID EdgeWebView::DoSize(VOID) | 194 VOID EdgeWebView::DoSize(VOID) |
195 { | 195 { |
196 RECT bounds; | 196 RECT bounds; |
197 BOOL isVisible; | |
197 | 198 |
198 GetClientRect(hWnd, &bounds); | 199 GetClientRect(hWnd, &bounds); |
199 WebView->put_Bounds(bounds); | 200 WebView->put_Bounds(bounds); |
201 WebView->get_IsVisible(&isVisible); | |
202 if(!isVisible) | |
203 WebView->put_IsVisible(TRUE); | |
200 } | 204 } |
201 | 205 |
202 BOOL EdgeBrowser::Detect(VOID) | 206 BOOL EdgeBrowser::Detect(VOID) |
203 { | 207 { |
204 CreateWebView2EnvironmentWithDetails(nullptr, nullptr, nullptr, | 208 CreateWebView2EnvironmentWithDetails(nullptr, nullptr, nullptr, |
218 if (WebView) | 222 if (WebView) |
219 { | 223 { |
220 // Call the desired function | 224 // Call the desired function |
221 switch (action) | 225 switch (action) |
222 { | 226 { |
223 case DW_HTML_GOBACK: | 227 case DW_HTML_GOBACK: |
224 { | 228 { |
225 // Call the IWebView2WebView object's GoBack function. | 229 // Call the IWebView2WebView object's GoBack function. |
226 WebView->GoBack(); | 230 WebView->GoBack(); |
227 break; | 231 break; |
228 } | 232 } |
229 | 233 |
230 case DW_HTML_GOFORWARD: | 234 case DW_HTML_GOFORWARD: |
231 { | 235 { |
232 // Call the IWebView2WebView object's GoForward function. | 236 // Call the IWebView2WebView object's GoForward function. |
233 WebView->GoForward(); | 237 WebView->GoForward(); |
234 break; | 238 break; |
235 } | 239 } |
236 | 240 |
237 case DW_HTML_GOHOME: | 241 case DW_HTML_GOHOME: |
238 { | 242 { |
239 // Call the IWebView2WebView object's GoHome function. | 243 // Call the IWebView2WebView object's GoHome function. |
240 dw_html_url(hWnd, (char*)DW_HOME_URL); | 244 dw_html_url(hWnd, (char*)DW_HOME_URL); |
241 break; | 245 break; |
242 } | 246 } |
243 | 247 |
244 case DW_HTML_SEARCH: | 248 case DW_HTML_SEARCH: |
245 { | 249 { |
246 // Call the IWebView2WebView object's GoSearch function. | 250 // Call the IWebView2WebView object's GoSearch function. |
247 //WebView->GoSearch(); | 251 //WebView->GoSearch(); |
248 break; | 252 break; |
249 } | 253 } |
250 | 254 |
251 case DW_HTML_RELOAD: | 255 case DW_HTML_RELOAD: |
252 { | 256 { |
253 // Call the IWebView2WebView object's Refresh function. | 257 // Call the IWebView2WebView object's Refresh function. |
254 WebView->Reload(); | 258 WebView->Reload(); |
255 } | 259 } |
256 | 260 |
257 case DW_HTML_STOP: | 261 case DW_HTML_STOP: |
258 { | 262 { |
259 // Call the IWebView2WebView object's Stop function. | 263 // Call the IWebView2WebView object's Stop function. |
260 //WebView->Stop(); | 264 //WebView->Stop(); |
261 } | 265 } |
262 } | 266 } |
263 } | 267 } |
264 } | 268 } |
265 | 269 |
266 int EdgeWebView::Raw(const char* string) | 270 int EdgeWebView::Raw(const char* string) |