hluk / hluk/CopyQ

CopyQ windows have the wrong `activationPolicy`

Open
#1,330 1 comment 0 reactions 0 assignees View on GitHub
bug macOS
Dominant language
C++
Stars
12.3k
Forks
593
Avg merge
2d 8h
Merged PRs (30d)
9

Description

**Describe the bug**

My app [alt-tab-macos](https://github.com/lwouis/alt-tab-macos) queries the OS for all the `NSRunningApplication`s currently running. In that list, we check each app `activationPolicy`. CopyQ's policy is incorrectly set as `.prohibited`. Apple's docs describe this policy as:

> The application doesn’t appear in the Dock and may not create windows or be activated.

Because apps having the `.prohibited` policy are not supposed to open windows, we ignore them in alt-tab-macos. However CopyQ does open windows, thus we had to whitelist it specifically:

https://github.com/lwouis/alt-tab-macos/blob/e40f859c3a60a3d64fafc8147d4c2a7d3f8e6a45/src/logic/Applications.swift#L68

**Expected behavior**

I think CopyQ should have the [`.accessory` policy](https://developer.apple.com/documentation/appkit/nsapplication/activationpolicy/accessory).

**Version, OS and Environment**
- Application Version **3.9.0**
- OS macOS **10.15.3**

**Additional context**

I think this is where this is set in CopyQ:

https://github.com/hluk/CopyQ/blob/e2067d4f317857b49afd18bddd6d545480fb51a2/src/platform/mac/macplatform.mm#L158

I suggest you use `.accessory` instead. What do you think?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.