Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Linux] Implement Window::SetMinimumSize / SetMaximumSize

Open
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp

Research direction

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.

Written by the indexing model from the issue text.

Description

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
Dominant language
C++
Stars
34
Forks
7
Avg merge
3d 1h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libnativeapi/nativeapi

All issues in libnativeapi/nativeapi

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.