Skip to content

Commit

Permalink
Fix up patch
Browse files Browse the repository at this point in the history
  • Loading branch information
rzhao271 committed Sep 29, 2022
1 parent 182872c commit 8b112ff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions patches/chromium/fix_remove_caption-removing_style_call.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ or resizing, but Electron does not seem to run into that issue
for opaque frameless windows even with that block commented out.

diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 1f883dc7d46d5cc3fddffe75c55e6b96fb0fc5f2..8631603e60187e49f6c28b51bb014f368baab183 100644
index a8b66dcfab91e3f2c86afdd31e207db474ee4ac1..9225e2bd04a56fa256ae4f11fc08bfd78696663d 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1726,7 +1726,22 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
@@ -1730,7 +1730,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
SendMessage(hwnd(), WM_CHANGEUISTATE, MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS),
0);

- if (!delegate_->HasFrame()) {
+ DWORD is_popup = GetWindowLong(hwnd(), GWL_STYLE) & WS_POPUP;
+ LONG is_popup =
+ GetWindowLong(hwnd(), GWL_STYLE) & static_cast<LONG>(WS_POPUP);
+
+ // For transparent windows, Electron removes the WS_CAPTION style,
+ // so we continue to remove it here. If we didn't, an opaque rectangle
Expand Down

0 comments on commit 8b112ff

Please sign in to comment.