[PR #1933] Fix Apple displays shown/controlled in menu when hidden/disabled by preference #1342

Open
opened 2026-11-02 22:01:19 -07:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MonitorControl/MonitorControl/pull/1933
Author: @morenopl
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix-hide-apple-displays-in-menu


📝 Commits (1)

  • 66f4347 Fix Apple displays shown/control in menu when hidden by preference

📊 Changes

2 files changed (+3 additions, -3 deletions)

View changed files

📝 MonitorControl/Support/DisplayManager.swift (+2 -2)
📝 MonitorControl/Support/MenuHandler.swift (+1 -1)

📄 Description

Problem

The menu could show displays that should have been left out:

  • With the "hide Apple displays" preference enabled, Apple displays still appeared in the menu.
  • The built-in display showed up and was controlled by the app even when it was not set to be controlled.

Cause

MenuHandler builds a filtered list of displays, then calls DisplayManager.sortDisplaysByFriendlyName(). That function ignored the list and sorted DisplayManager.displays, which holds every display. Assigning the result back to displays replaced the filtered list with the full one, so the filtering had no effect.

Fix

sortDisplaysByFriendlyName now takes the displays to sort as a parameter, and MenuHandler passes in its filtered list. The sort order is unchanged.

Testing

Tested locally:

  • Apple displays are hidden from the menu when the preference is on.
  • The built-in display is no longer controlled when it isn't set to be.
  • Menu order is unchanged.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MonitorControl/MonitorControl/pull/1933 **Author:** [@morenopl](https://github.com/morenopl) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-hide-apple-displays-in-menu` --- ### 📝 Commits (1) - [`66f4347`](https://github.com/MonitorControl/MonitorControl/commit/66f4347c1c36cfa8395fdb190e60bd7ad91c931c) Fix Apple displays shown/control in menu when hidden by preference ### 📊 Changes **2 files changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `MonitorControl/Support/DisplayManager.swift` (+2 -2) 📝 `MonitorControl/Support/MenuHandler.swift` (+1 -1) </details> ### 📄 Description ## Problem The menu could show displays that should have been left out: - With the "hide Apple displays" preference enabled, Apple displays still appeared in the menu. - The built-in display showed up and was controlled by the app even when it was not set to be controlled. ## Cause `MenuHandler` builds a filtered list of displays, then calls `DisplayManager.sortDisplaysByFriendlyName()`. That function ignored the list and sorted `DisplayManager.displays`, which holds every display. Assigning the result back to `displays` replaced the filtered list with the full one, so the filtering had no effect. ## Fix `sortDisplaysByFriendlyName` now takes the displays to sort as a parameter, and `MenuHandler` passes in its filtered list. The sort order is unchanged. ## Testing Tested locally: - Apple displays are hidden from the menu when the preference is on. - The built-in display is no longer controlled when it isn't set to be. - Menu order is unchanged. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github-starred/MonitorControl#1342
No description provided.