Skip to content

[Linux] Implement Window::SetMinimumSize / SetMaximumSize #55

Description

@lijy91

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):

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions