Modules/Graphics
Шурупов Илья Викторович f58ec25520 Give every desktop app its own launcher and icon
Each window now announces a WindowIdentity (app id + title) instead of the
hardcoded "modules" app id, so GNOME/KDE can match a running window to its
.desktop launcher and show the right icon in the dock and app grid.

cmake/DesktopEntry.cmake is the single place an executable declares that
identity: modules_add_desktop_entry() compiles MODULES_APP_ID/NAME into the
target, generates <id>.desktop pointing at the built binary and stages the
icon into the hicolor theme layout. The install-desktop-entries target copies
them into ~/.local/share and refreshes the desktop database and icon cache.

Launchers: Sketch2D (reuses the Android launcher icon), Taskboard (new kanban
icon) and the generic Modules identity/icon used by the widget gallery and by
every application that has no entry of its own.
2026-10-26 00:54:27 +03:00
..
examples Fix zoom texture crash and text metrics, add window wake and touchpad pinch 2026-10-21 17:55:07 +03:00
private Give every desktop app its own launcher and icon 2026-10-26 00:54:27 +03:00
public Give every desktop app its own launcher and icon 2026-10-26 00:54:27 +03:00
rsc Graphics: symbol fallback fonts so UI arrows, dots and crosses render 2026-10-24 20:03:20 +03:00
tests Graphics: symbol fallback fonts so UI arrows, dots and crosses render 2026-10-24 20:03:20 +03:00
CMakeLists.txt Give every desktop app its own launcher and icon 2026-10-26 00:54:27 +03:00
README.md Replace GLFW with a native Wayland window backend 2026-10-14 22:35:53 +03:00

Graphics

Native Wayland window, Vulkan presentation, nanovg canvas and ImGui debug UI. Wayland is the only supported platform.

Window backend

  • WaylandConnection binds the globals: xdg_wm_base, wl_seat, wl_data_device_manager, wp_viewporter, wp_fractional_scale_v1, wp_cursor_shape_v1, zwp_text_input_v3 and xdg-decoration.
  • WaylandWindow owns the surface and toplevel, applies configures (size, maximized, tiled, activated), fractional scale through a viewport, the window geometry and input region, and starts compositor move/resize.
  • WaylandSeat handles pointer (cursor shapes, wheel), keyboard (xkbcommon keymap, compose, key repeat through a timerfd in the same poll), clipboard (text/plain;charset=utf-8) and IME commits from text-input-v3.
  • WindowFrame is the pure geometry of the client-side frame: shadow margin, content rect, input region and edge hit-testing. It is unit-tested.
  • WindowInputDispatcher turns backend input into EventHandler events and forwards it to observers such as ImGuiPlatform, which feeds ImGui IO.

Frame

The surface is the content plus a transparent shadow margin. Each frame draws the UI in content coordinates, then ImGui, then a separate nanovg pass that cuts the rounded corners, strokes the outline and paints the shadow behind the content. The swapchain uses premultiplied alpha when the surface supports it.

Tests

TestGraphics covers frame geometry and key mapping without a display.