From 960904d481a25136ce8f48af68070e76797be5fb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 29 Aug 2019 12:15:08 +1000 Subject: [PATCH] wacom: don't fetch the dimensions if we're stopping live mode There's just no point to that and if the tablet is currently in live mode, it refuses the GET_WIDTH request anyway. Signed-off-by: Peter Hutterer --- tuhi/wacom.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tuhi/wacom.py b/tuhi/wacom.py index ef3bcc6..a6ca0df 100644 --- a/tuhi/wacom.py +++ b/tuhi/wacom.py @@ -805,12 +805,13 @@ class WacomProtocolSlate(WacomProtocolSpark): self._on_sysevent_data_received) def live_mode(self, mode, uhid): - # Slate tablet has two models A5 and A4 - # Here, we read real tablet dimensions before - # starting live mode - self.update_dimensions() - self.x_max = self.width - 1000 - self.y_max = self.height - 500 + if mode: + # Slate tablet has two models A5 and A4 + # Here, we read real tablet dimensions before + # starting live mode + self.update_dimensions() + self.x_max = self.width - 1000 + self.y_max = self.height - 500 return super().live_mode(mode, uhid)