fix: ensure dragging works again after emitting contextmenu event (#48224)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot]
2025-08-29 13:15:17 -04:00
committed by GitHub
parent 207f64fec8
commit 0098160f2a
2 changed files with 1 additions and 5 deletions

View File

@@ -324,11 +324,6 @@ bool NativeWindowViews::PreHandleMSG(UINT message,
return false;
}
case WM_RBUTTONUP: {
if (!has_frame())
electron::api::WebContents::SetDisableDraggableRegions(false);
return false;
}
case WM_GETMINMAXINFO: {
WINDOWPLACEMENT wp;
wp.length = sizeof(WINDOWPLACEMENT);

View File

@@ -142,6 +142,7 @@ bool ElectronDesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
if (prevent_default) {
electron::api::WebContents::SetDisableDraggableRegions(true);
views::DesktopWindowTreeHostWin::HandleMouseEvent(event);
electron::api::WebContents::SetDisableDraggableRegions(false);
}
return prevent_default;
}