Skip to content

Commit 42ea7cb

Browse files
committed
fix: ignore case when comparing excluded apps
1 parent cd752fa commit 42ea7cb

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ class PanoExtension {
162162
if (
163163
wmClass &&
164164
this.settings.get_boolean('watch-exclusion-list') &&
165-
this.settings.get_strv('exclusion-list').indexOf(wmClass) >= 0
165+
this.settings
166+
.get_strv('exclusion-list')
167+
.map((s) => s.toLowerCase())
168+
.indexOf(wmClass.toLowerCase()) >= 0
166169
) {
167170
clipboardManager.stopTracking();
168171
} else if (clipboardManager.isTracking === false) {

src/utils/clipboardManager.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,18 @@ export class ClipboardManager extends Object {
155155
if (this.settings.get_boolean('is-in-incognito')) {
156156
return;
157157
}
158+
const focussedWindow = Global.get().display.focus_window;
159+
const wmClass = focussedWindow?.get_wm_class();
160+
if (
161+
wmClass &&
162+
this.settings.get_boolean('watch-exclusion-list') &&
163+
this.settings
164+
.get_strv('exclusion-list')
165+
.map((s) => s.toLowerCase())
166+
.indexOf(wmClass.toLowerCase()) >= 0
167+
) {
168+
return;
169+
}
158170
if (selectionType === SelectionType.SELECTION_CLIPBOARD) {
159171
try {
160172
const result = await this.getContent(ClipboardType.CLIPBOARD);

0 commit comments

Comments
 (0)