fix: explorer restart does not recreated thumbnail toolbar buttons (#39551)
fix: explorer restart does not recreated thumbnail toolbar buttons.
This commit is contained in:
parent
95bf9d8adb
commit
9937a2bbe8
3 changed files with 14 additions and 0 deletions
|
@ -254,6 +254,10 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options,
|
||||||
|
|
||||||
if (title_bar_style_ != TitleBarStyle::kNormal)
|
if (title_bar_style_ != TitleBarStyle::kNormal)
|
||||||
set_has_frame(false);
|
set_has_frame(false);
|
||||||
|
|
||||||
|
// If the taskbar is re-created after we start up, we have to rebuild all of
|
||||||
|
// our buttons.
|
||||||
|
taskbar_created_message_ = RegisterWindowMessage(TEXT("TaskbarCreated"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (enable_larger_than_screen())
|
if (enable_larger_than_screen())
|
||||||
|
|
|
@ -318,6 +318,10 @@ class NativeWindowViews : public NativeWindow,
|
||||||
// Controls Overlay if enabled on Windows.
|
// Controls Overlay if enabled on Windows.
|
||||||
SkColor overlay_button_color_;
|
SkColor overlay_button_color_;
|
||||||
SkColor overlay_symbol_color_;
|
SkColor overlay_symbol_color_;
|
||||||
|
|
||||||
|
// The message ID of the "TaskbarCreated" message, sent to us when we need to
|
||||||
|
// reset our thumbar buttons.
|
||||||
|
UINT taskbar_created_message_ = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Handles unhandled keyboard messages coming back from the renderer process.
|
// Handles unhandled keyboard messages coming back from the renderer process.
|
||||||
|
|
|
@ -221,6 +221,12 @@ bool NativeWindowViews::PreHandleMSG(UINT message,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (message == taskbar_created_message_) {
|
||||||
|
// We need to reset all of our buttons because the taskbar went away.
|
||||||
|
taskbar_host_.RestoreThumbarButtons(GetAcceleratedWidget());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
switch (message) {
|
switch (message) {
|
||||||
// Screen readers send WM_GETOBJECT in order to get the accessibility
|
// Screen readers send WM_GETOBJECT in order to get the accessibility
|
||||||
// object, so take this opportunity to push Chromium into accessible
|
// object, so take this opportunity to push Chromium into accessible
|
||||||
|
|
Loading…
Reference in a new issue