Skip to content

Commit

Permalink
fix: do not render inactive titlebar as active on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Aug 5, 2020
1 parent 48d1a70 commit 6033754
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions shell/browser/native_window_views_win.cc
Expand Up @@ -301,6 +301,15 @@ bool NativeWindowViews::PreHandleMSG(UINT message,
}
return false;
}
case WM_NCACTIVATE: {
// Chromium renders titlebar as active as long as there is a views window
// active, which is different from most other win32 apps. We prevent this
// behavior by overriding the WM_NCACTIVATE message to default behavior.
// See also https://github.com/electron/electron/issues/24647.
*result =
::DefWindowProc(GetAcceleratedWidget(), message, w_param, l_param);
return true;
}
default:
return false;
}
Expand Down

0 comments on commit 6033754

Please sign in to comment.