2018-10-24 18:24:11 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-09-21 00:30:26 +00:00
|
|
|
From: Charles Kerr <charles@charleskerr.com>
|
|
|
|
Date: Thu, 20 Sep 2018 17:50:17 -0700
|
|
|
|
Subject: allow_nested_error_trackers.patch
|
|
|
|
|
|
|
|
Only one X11ErrorTracker should exist at a time, but upstream has a bug
|
|
|
|
where two can exist if running in headless mode --
|
|
|
|
ui::(anonymous namespace)::SupportsEWMH() [inner tracker is created]
|
|
|
|
ui::WmSupportsHint()
|
|
|
|
ui::IsX11WindowFullScreen()
|
|
|
|
ui::ScreensaverWindowFinder::IsScreensaverWindow()
|
|
|
|
ui::ScreensaverWindowFinder::ShouldStopIterating()
|
|
|
|
ui::EnumerateTopLevelWindows()
|
|
|
|
ui::ScreensaverWindowFinder::ScreensaverWindowExists() [outer tracker created]
|
|
|
|
ui::CheckIdleStateIsLocked()
|
|
|
|
ui::CalculateIdleState()
|
|
|
|
Removal of either tracker could have side-effects in some code paths,
|
|
|
|
so this is probably better handled upstream. This patch tries to do the
|
|
|
|
least harm in the interim by removing the check that prevents more than
|
|
|
|
one tracker from existing at a time.
|
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/ui/gfx/x/x11_error_tracker.cc b/ui/gfx/x/x11_error_tracker.cc
|
2020-05-26 20:06:26 +00:00
|
|
|
index 6592ae0483884815697358040123eed5ee657816..d6862673c0b5a61db550c084291787ad1549db69 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/ui/gfx/x/x11_error_tracker.cc
|
|
|
|
+++ b/ui/gfx/x/x11_error_tracker.cc
|
|
|
|
@@ -24,7 +24,7 @@ namespace gfx {
|
|
|
|
X11ErrorTracker::X11ErrorTracker() {
|
|
|
|
// This is a non-exhaustive check for incorrect usage. It disallows nested
|
|
|
|
// X11ErrorTracker instances on the same thread.
|
2020-05-26 20:06:26 +00:00
|
|
|
- DCHECK(g_handler == nullptr);
|
|
|
|
+ // DCHECK(g_handler == nullptr);
|
2018-09-14 05:02:16 +00:00
|
|
|
g_handler = this;
|
|
|
|
XSync(GetXDisplay(), False);
|
|
|
|
old_handler_ = XSetErrorHandler(X11ErrorHandler);
|