mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
31 lines
1.2 KiB
Diff
31 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cheng Zhao <zcbenz@gmail.com>
|
|
Date: Thu, 16 May 2019 13:52:12 +0900
|
|
Subject: tabbed_window_lagging.patch
|
|
|
|
Fix lagging when using tabbed windows.
|
|
|
|
Later Chromium has some enhancements on graphics code that fix the lagging
|
|
problem, but the changes are split in multiple commits on multiple files and
|
|
we can not just cherry-pick them.
|
|
|
|
Instead I'm just using the dummy fix and it does not seem to have side effects.
|
|
|
|
diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm
|
|
index 8841b59f6b70ac4687adfde61a1fba1424e57e48..cc3659319c4076043a0493798db3c7b8a4afd21e 100644
|
|
--- a/ui/views/cocoa/bridged_native_widget.mm
|
|
+++ b/ui/views/cocoa/bridged_native_widget.mm
|
|
@@ -1039,6 +1039,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
|
// BridgedNativeWidget, ui::CATransactionObserver
|
|
|
|
bool BridgedNativeWidget::ShouldWaitInPreCommit() {
|
|
+ // Fix lagging when using tabbed windows, see the issue for more:
|
|
+ // https://github.com/electron/electron/issues/16925
|
|
+ if (@available(macOS 10.12, *)) {
|
|
+ if ([[window_ tabbedWindows] count] > 0)
|
|
+ return false;
|
|
+ }
|
|
if (!window_visible_)
|
|
return false;
|
|
if (ca_transaction_sync_suppressed_)
|