Skip to content

Commit

Permalink
Make sure to remove Tablet from active tablets when disposing
Browse files Browse the repository at this point in the history
(Now if only OpenTabletDriver actually disposed of filters when the owning device disconnected instead of leaving them as is indefinitely)
  • Loading branch information
Mrcubix committed Oct 10, 2024
1 parent 382a39e commit 13d5e23
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Touch-Gestures-0.6.x/GesturesHandler.cs
Original file line number Diff line number Diff line change
@@ -284,6 +284,9 @@ public void Dispose()
if (_awaitingDaemon)
GesturesDaemonBase.DaemonLoaded -= OnDaemonLoaded;

if (_tablet != null)
_daemon?.RemoveTablet(_tablet);

_awaitingDaemon = false;

GC.SuppressFinalize(this);
3 changes: 3 additions & 0 deletions Touch-Gestures/GesturesHandler.cs
Original file line number Diff line number Diff line change
@@ -203,6 +203,9 @@ public void Dispose()
if (_profile != null)
_profile.ProfileChanged -= OnProfileChanged;

if (_tablet != null)
_daemon?.RemoveTablet(_tablet);

GC.SuppressFinalize(this);
}

0 comments on commit 13d5e23

Please sign in to comment.