From a9ba98847c169bf9519b9a749f378900dc1c58cb Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Sat, 9 Dec 2023 17:01:03 -0800 Subject: [PATCH] update _device_pattern regex for Freezing with 100% CPU when parsing Xrandr output - 1.23.6 #490 --- jc/parsers/xrandr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jc/parsers/xrandr.py b/jc/parsers/xrandr.py index 462a7df7..a785be35 100644 --- a/jc/parsers/xrandr.py +++ b/jc/parsers/xrandr.py @@ -346,8 +346,8 @@ _device_pattern = ( + r"\+(?P\d+)\+(?P\d+))? " + r"(?P(normal|right|left|inverted)?) ?" + r"(?P(X axis|Y axis|X and Y axis)?) ?" - + r"\(normal left inverted right x axis y axis\)" - + r"( ((?P\d+)mm x (?P\d+)mm)?)?" + + r"(\(normal left inverted right x axis y axis\))?" + + r"( ?((?P\d+)mm x (?P\d+)mm)?)?" )