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 <peter.hutterer@who-t.net>
pull/215/head
Peter Hutterer 2019-08-29 12:15:08 +10:00
parent 9eedbe108a
commit 960904d481
1 changed files with 7 additions and 6 deletions

View File

@ -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)