menios icon indicating copy to clipboard operation
menios copied to clipboard

Implement window manager core

Open pbalduino opened this issue 3 months ago • 0 comments

Summary

Implement the window manager that handles window placement, sizing, stacking order, and user interactions (move, resize, minimize, maximize, close).

Goals

  • Window placement policies
  • Move and resize operations
  • Minimize, maximize, close
  • Z-order management (raise, lower)
  • Window decorations integration

Implementation

Window Operations

```c void wm_move_window(struct window *w, int x, int y); void wm_resize_window(struct window *w, int width, int height); void wm_raise_window(struct window *w); // Bring to front void wm_lower_window(struct window *w); // Send to back void wm_close_window(struct window *w); void wm_minimize_window(struct window *w); void wm_maximize_window(struct window *w); ```

Window Placement

```c // Cascade: Each new window offset from previous void wm_place_cascade(struct window *w) { static int offset = 0; w->x = 100 + offset; w->y = 100 + offset; offset = (offset + 30) % 200; }

// Center: Place in screen center void wm_place_center(struct window *w) { w->x = (screen_width - w->width) / 2; w->y = (screen_height - w->height) / 2; } ```

Timeline

Total: 3-4 weeks

Definition of Done

  • [ ] Windows can be moved
  • [ ] Windows can be resized
  • [ ] Minimize/maximize/close work
  • [ ] Z-order management works
  • [ ] Placement policies work
  • [ ] Smooth user experience

Dependencies

  • #403: Compositor core
  • #399: Input events

See docs/road/road_to_gui.md for complete roadmap.

pbalduino avatar Oct 30 '25 22:10 pbalduino