Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[macOS] Application-level hide/show (NSApp hide/unhide)

Đang mở
#59 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp, macos, objective-c
Lĩnh vực
api, desktop

Hướng nghiên cứu

Start with src/platform/macos/window_macos.mm and the existing Window::Hide() behavior, then trace the Application API entry point. Check the macOS hide-twice and global-shortcut cases described in the issue; done means Application::Hide(), Show(), and IsHidden() expose the requested NSApp behavior without breaking window reopening or shortcut handling.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

On macOS, Window::Hide() uses orderOut: (src/platform/macos/window_macos.mm). That's right for hiding one window, but the application stays "shown" as far as the system is concerned. The Dock menu keeps offering "Hide", clicking the Dock icon doesn't bring the window back, and the previously active app doesn't get focus back.

Apps that live in the tray or menu bar usually want app-level hiding. Proposal: add Application::Hide() / Application::Show() (and IsHidden()), backed by [NSApp hide:] / [NSApp unhide:] on macOS. Also check the hide-twice case on macOS 14+, and hiding while a global shortcut handler is running.

Background, from window_manager (moving onto nativeapi in 0.6.0):

  • leanflutter/window_manager#431: the Dock menu doesn't understand hide()
  • leanflutter/window_manager#530: a PR that switched hide() to NSApp.hide(nil)
  • possibly related: leanflutter/window_manager#501 (window can't be reopened after hiding twice on macOS 14+), #543 (crash on hide() with hotkey_manager)
Ngôn ngữ chính
C++
Star
34
Fork
7
Merge trung bình
3 ngày 1 giờ
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của libnativeapi/nativeapi

Tất cả issue của libnativeapi/nativeapi

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.