The window now extends into the display cutout and the top bars sit at the top edge with the gap fixed at the screen center. Top buttons are at most 0.8 of the bottom bar buttons. The cutout query is removed again. |
||
|---|---|---|
| .. | ||
| examples | ||
| private | ||
| public | ||
| rsc | ||
| tests | ||
| CMakeLists.txt | ||
| README.md | ||
Graphics
Native Wayland window, Vulkan presentation, nanovg canvas and ImGui debug UI. Wayland is the only supported platform.
Window backend
WaylandConnectionbinds the globals:xdg_wm_base,wl_seat,wl_data_device_manager,wp_viewporter,wp_fractional_scale_v1,wp_cursor_shape_v1,zwp_text_input_v3andxdg-decoration.WaylandWindowowns 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.WaylandSeathandles 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 fromtext-input-v3.WindowFrameis the pure geometry of the client-side frame: shadow margin, content rect, input region and edge hit-testing. It is unit-tested.WindowInputDispatcherturns backend input intoEventHandlerevents and forwards it to observers such asImGuiPlatform, 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.