fix: Ignore -webkit-app-region: drag; when window is in full screen mode. (#41307)

Co-authored-by: Mikhail Leliakin <lelyakin.aus@gmail.com>
This commit is contained in:
Mikhail Leliakin 2024-02-14 21:12:41 +11:00 committed by GitHub
parent 32920af4b7
commit 79147e4dd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -757,6 +757,11 @@ int NativeWindow::NonClientHitTest(const gfx::Point& point) {
} }
#endif #endif
// This is to disable dragging in HTML5 full screen mode.
// Details: https://github.com/electron/electron/issues/41002
if (GetWidget()->IsFullscreen())
return HTNOWHERE;
for (auto* provider : draggable_region_providers_) { for (auto* provider : draggable_region_providers_) {
int hit = provider->NonClientHitTest(point); int hit = provider->NonClientHitTest(point);
if (hit != HTNOWHERE) if (hit != HTNOWHERE)