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

[Linux] Implement Window::SetMinimumSize / SetMaximumSize

Đã đóng
#55 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
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
desktop, operating-systems

Hướng nghiên cứu

Start in src/platform/linux/window_linux.cpp and read Window::SetMinimumSize(), Window::SetMaximumSize(), and SetAspectRatio(). Use gtk_window_set_geometry_hints() with the GTK minimum, maximum, and existing aspect-ratio hints without overwriting them. Done means constraints work before mapping, survive maximize and unmaximize, and apply correctly with client-side decorations.

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

Mô tả

bug

Window::SetMinimumSize() and Window::SetMaximumSize() are stubs on Linux (src/platform/linux/window_linux.cpp), so min/max size constraints set through nativeapi have no effect there. The getters return whatever was stored.

Expected: enforce the constraints with gtk_window_set_geometry_hints() (GDK_HINT_MIN_SIZE / GDK_HINT_MAX_SIZE), combined with the aspect-ratio hints that SetAspectRatio() already sets. Otherwise one call would overwrite the other's hints. Check that:

  • the constraints survive maximize → unmaximize
  • they apply when set before the window is mapped
  • they work with client-side decorations (the hints are in window-frame coordinates)

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

  • leanflutter/window_manager#189: min/max size not applied (also #107, #422, #538)
  • leanflutter/window_manager#587: a PR that switched to gtk_window_set_geometry_hints
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.