app.dhover×321 error×124all
// F10 pointer-capture demo — pointer lock (oneshot AND persistent), confine,
// and relative motion on top of the xdg-shell scaffold (../scaffold/app.d;
// findings: ../../scaffold.md, ../../f10-pointer-capture.md).
//
// Choreographed "mouselook" phase machine instead of a keyboard toggle — on a
// headless compositor the input that advances the phases is injected by
// ./run.sh through this binary's own `inject` mode (zwlr_virtual_pointer_v1,
// ./inject.d). Each injector invocation plugs/unplugs its device, so the seat
// pointer capability flaps (the F12 lesson: destroy/re-create wl_pointer on
// every capabilities edge). Compositor-initiated deactivation (`unlocked`) is
// NOT triggered by focus-leave or device-unplug on sway — only by a
// window-focus change — so ./run.sh runs a second, passive instance of this
// demo (WSI_PASSIVE=1, app id wsi-f10-passive) purely as a focus target and
// steals focus with `swaymsg [app_id=…] focus` whenever a phase needs its
// `unlocked`:
//
//   pre             abs motion + relative motion both flowing (unlocked)
//   lock-oneshot    lock_pointer(lifetime=ONESHOT) requested while the
//                   pointer has NO focus on the surface → `locked` must wait
//                   for entry (the async-failable contract); deactivation →
//                   `unlocked` → object DEFUNCT, destroy it
//   relock-oneshot  re-lock after a oneshot ends requires a brand-new object
//   lock-persistent same request with lifetime=PERSISTENT: after `unlocked`
//                   the object is kept and `locked` fires AGAIN on it; on the
//                   2nd activation the demo sets set_cursor_position_hint,
//                   commits, and destroys (client unlock) → the compositor
//                   may warp the cursor to the hint (verified by the next
//                   enter coordinates)
//   confine         confine_pointer(persistent) to the center-half wl_region;
//                   ./run.sh pushes the pointer at the region boundary and
//                   the demo records the clamped wl_pointer.motion stream
//
// While any lock is active, wl_pointer.motion must STOP (only
// zwp_relative_pointer_v1.relative_motion arrives) — the demo counts
// violations. Relative motion logs dx/dy AND dx_unaccel/dy_unaccel; with a
// wlrctl-injected virtual pointer they are expected 1:1 (no libinput accel) —
// logged honestly either way. Headless-safe: no compositor → SKIP, exit 0; a
// seat-less compositor (headless weston) still yields the registry probe.
module 
(module) app
app
;
import c; // ImportC: wayland-client + xdg-shell/pointer-constraints/relative-pointer glue
unable to read module `c` Expected 'c.d' or 'c/package.d' in one of the following import paths:
unable to read module `c` Expected 'c.d' or 'c/package.d' in one of the following import paths:
import instrument;
unable to read module `instrument` Expected 'instrument.d' or 'instrument/package.d' in one of the following import paths:
unable to read module `instrument` Expected 'instrument.d' or 'instrument/package.d' in one of the following import paths:
import
(package) core
core
.
(package) core.stdc
stdc
.
(module) core.stdc.stdio

D header file for C99 <stdio.h>

pubs.opengroup.org/onlinepubs/009695399/basedefs/stdio.h.html, stdio.h

Source

core/stdc/stdio.d

@copyrightCopyright Sean Kelly 2005 - 2009.@licenseDistributed under the Boost Software License 1.0. (See accompanying file LICENSE)@authorsSean Kelly, Alex Rønne Petersen@standardsISO/IEC 9899:1999 (E)
stdio
:
(alias) app.printf = int core.stdc.stdio.printf(scope const(char*) format, scope const ...) nothrow @nogc
printf
;
import
(package) core
core
.
(package) core.stdc
stdc
.
(module) core.stdc.stdlib

D header file for C99.

pubs.opengroup.org/onlinepubs/009695399/basedefs/stdlib.h.html, stdlib.h

Source

core/stdc/stdlib.d

@copyrightCopyright Sean Kelly 2005 - 2014.@licenseDistributed under the Boost Software License 1.0. (See accompanying file LICENSE)@authorsSean Kelly@standardsISO/IEC 9899:1999 (E)
stdlib
:
(alias) app.atoi = int core.stdc.stdlib.atoi(scope const(char*) nptr) nothrow @nogc
atoi
,
(alias) app.getenv = char* core.stdc.stdlib.getenv(scope const(char*) name) nothrow @nogc
getenv
;
import
(package) core
core
.
(package) core.stdc
stdc
.
(module) core.stdc.string

D header file for C99.

pubs.opengroup.org/onlinepubs/009695399/basedefs/string.h.html, string.h

Source

core/stdc/string.d

@copyrightCopyright Sean Kelly 2005 - 2009.@licenseDistributed under the Boost Software License 1.0. (See accompanying file LICENSE)@authorsSean Kelly@standardsISO/IEC 9899:1999 (E)
string
:
(alias) app.strcmp = int core.stdc.string.strcmp(scope const(char*) s1, scope const(char*) s2) pure nothrow @nogc
strcmp
;
enum int
(constant) int app.defaultWidth = 640
defaultWidth
= 640;
enum int
(constant) int app.defaultHeight = 480
defaultHeight
= 480;
enum int
(constant) int app.hintX = 400
hintX
= 400,
(constant) int app.hintY = 300
hintY
= 300; // set_cursor_position_hint target (surface-local)
enum
(enum) app.Phase
Phase
{
(enum value) app.Phase.pre = 0
pre
,
(enum value) app.Phase.lockOneshot = 1
lockOneshot
,
(enum value) app.Phase.relockOneshot = 2
relockOneshot
,
(enum value) app.Phase.lockPersistent = 3
lockPersistent
,
(enum value) app.Phase.confine = 4
confine
,
} __gshared immutable(char*)[5]
(immutable global) immutable(char*[5]) app.g_phaseNames
g_phaseNames
= [
"pre", "lock-oneshot", "relock-oneshot", "lock-persistent", "confine" ]; // -------------------------------------------------------------------- state struct
(struct) app.Buffer
Buffer
{ wl_buffer*
(field) _error_ app.Buffer.handle
handle
;
undefined identifier `wl_buffer`
uint*
(field) uint* app.Buffer.pixels
pixels
;
(alias) object.size_t = ulong
size_t
(field) ulong app.Buffer.byteSize
byteSize
;
int
(field) int app.Buffer.width
width
,
(field) int app.Buffer.height
height
;
bool
(field) bool app.Buffer.busy
busy
;
} __gshared { wl_display*
_error_ app.g_display
g_display
;
undefined identifier `wl_display`, did you mean variable `g_display`?
wl_registry*
_error_ app.g_registry
g_registry
;
undefined identifier `wl_registry`, did you mean variable `g_registry`?
wl_compositor*
_error_ app.g_compositor
g_compositor
;
undefined identifier `wl_compositor`, did you mean variable `g_compositor`?
wl_shm*
_error_ app.g_shm
g_shm
;
undefined identifier `wl_shm`, did you mean variable `g_shm`?
xdg_wm_base*
_error_ app.g_wmBase
g_wmBase
;
undefined identifier `xdg_wm_base`
wl_seat*
_error_ app.g_seat
g_seat
;
undefined identifier `wl_seat`, did you mean variable `g_seat`?
wl_pointer*
_error_ app.g_pointer
g_pointer
;
undefined identifier `wl_pointer`, did you mean variable `g_pointer`?
zwp_pointer_constraints_v1*
_error_ app.g_constraints
g_constraints
;
undefined identifier `zwp_pointer_constraints_v1`
zwp_relative_pointer_manager_v1*
_error_ app.g_relMgr
g_relMgr
;
undefined identifier `zwp_relative_pointer_manager_v1`
zwp_relative_pointer_v1*
_error_ app.g_relPointer
g_relPointer
;
undefined identifier `zwp_relative_pointer_v1`
zwp_locked_pointer_v1*
_error_ app.g_locked
g_locked
;
undefined identifier `zwp_locked_pointer_v1`
zwp_confined_pointer_v1*
_error_ app.g_confined
g_confined
;
undefined identifier `zwp_confined_pointer_v1`
wl_surface*
_error_ app.g_surface
g_surface
;
undefined identifier `wl_surface`, did you mean variable `g_surface`?
xdg_surface*
_error_ app.g_xdgSurface
g_xdgSurface
;
undefined identifier `xdg_surface`, did you mean variable `g_surface`?
xdg_toplevel*
_error_ app.g_toplevel
g_toplevel
;
undefined identifier `xdg_toplevel`, did you mean variable `g_toplevel`?
wl_callback*
_error_ app.g_frameCb
g_frameCb
;
undefined identifier `wl_callback`
(struct) app.Buffer
Buffer
[2]
_error_ app.g_buffers
g_buffers
;
int
(__gshared global) int app.g_width
g_width
= defaultWidth,
(__gshared global) int app.g_height
g_height
= defaultHeight;
int
(__gshared global) int app.g_pendingWidth
g_pendingWidth
,
(__gshared global) int app.g_pendingHeight
g_pendingHeight
;
(enum) app.Phase
Phase
(__gshared global) app.Phase app.g_phase
g_phase
= Phase.
Phase.pre
pre
;
bool
(__gshared global) bool app.g_lockActive
g_lockActive
,
(__gshared global) bool app.g_confineActive
g_confineActive
,
(__gshared global) bool app.g_haveFocus
g_haveFocus
,
(__gshared global) bool app.g_hintSet
g_hintSet
;
int
(__gshared global) int app.g_lockObjects
g_lockObjects
; // lock_pointer requests issued (== objects created)
int
(__gshared global) int app.g_lockActivations
g_lockActivations
; // `locked` events on the CURRENT lock object
int
(__gshared global) int app.g_absMotions
g_absMotions
,
(__gshared global) int app.g_absWhileLocked
g_absWhileLocked
,
(__gshared global) int app.g_relEvents
g_relEvents
,
(__gshared global) int app.g_entersAfterHint
g_entersAfterHint
;
bool
(__gshared global) bool app.g_unaccelDiffered
g_unaccelDiffered
;
double
(__gshared global) double app.g_yaw
g_yaw
= 0,
(__gshared global) double app.g_pitch
g_pitch
= 0; // the mouselook "angle readout"
int[4]
(__gshared global) int[4] app.g_confineRect
g_confineRect
; // x,y,w,h as passed to confine_pointer
double
(__gshared global) double app.g_cMinX
g_cMinX
= 1e9,
(__gshared global) double app.g_cMinY
g_cMinY
= 1e9,
(__gshared global) double app.g_cMaxX
g_cMaxX
= -1e9,
(__gshared global) double app.g_cMaxY
g_cMaxY
= -1e9;
bool
(__gshared global) bool app.g_configured
g_configured
,
(__gshared global) bool app.g_running
g_running
= true,
(__gshared global) bool app.g_autoExit
g_autoExit
,
(__gshared global) bool app.g_passive
g_passive
;
long
(__gshared global) long app.g_runUsCap
g_runUsCap
= 2_500_000;
int
(__gshared global) int app.g_frames
g_frames
,
(__gshared global) int app.g_commits
g_commits
;
} void
void app.setPhase(app.Phase p) nothrow @nogc
setPhase
(
(enum) app.Phase
Phase
(parameter) app.Phase p
p
) nothrow @nogc
{
(__gshared global) app.Phase app.g_phase
g_phase
=
(parameter) app.Phase p
p
;
instrEvent("phase", "name=%s", g_phaseNames[p]);
undefined identifier `instrEvent`, did you mean import `instrument`?
} // ------------------------------------------------------------- constraints /// Request a pointer lock for the current phase. Called right after the /// wl_pointer is (re)created on a capability gain — i.e. while the pointer /// has no focus on the surface yet, which is the async-failable contract /// under test: `locked` may only fire once the pointer enters the surface. void
void app.createLock(uint lifetime, const(char)* label) nothrow @nogc

Request a pointer lock for the current phase. Called right after the wl_pointer is (re)created on a capability gain — i.e. while the pointer has no focus on the surface yet, which is the async-failable contract under test: locked may only fire once the pointer enters the surface.

createLock
(uint
(parameter) uint lifetime
lifetime
, const(char)*
(parameter) const(char)* label
label
) nothrow @nogc
{ g_locked = wsi_lock_pointer(g_constraints, g_surface, g_pointer, null, lifetime); wsi_locked_add_listener(g_locked, &g_lockedListener, null);
undefined identifier `wsi_locked_add_listener`
(__gshared global) int app.g_lockObjects
g_lockObjects
++;
(__gshared global) int app.g_lockActivations
g_lockActivations
= 0;
instrEvent("lock_request", "lifetime=%s object=%d focus=%d note=%s",
undefined identifier `instrEvent`, did you mean import `instrument`?
lifetime == ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT ? "oneshot".
"oneshot".ptr
ptr
: "persistent".
"persistent".ptr
ptr
,
g_lockObjects, g_haveFocus ? 1 : 0, label); } /// Confine to the center half of the window — a real wl_region, destroyed /// right after the request (the compositor copies the region contents). void
void app.createConfine() nothrow @nogc

Confine to the center half of the window — a real wl_region, destroyed right after the request (the compositor copies the region contents).

createConfine
() nothrow @nogc
{
(__gshared global) int[4] app.g_confineRect
g_confineRect
= [
(__gshared global) int app.g_width
g_width
/ 4,
(__gshared global) int app.g_height
g_height
/ 4,
(__gshared global) int app.g_width
g_width
/ 2,
(__gshared global) int app.g_height
g_height
/ 2];
wl_region*
(local variable) _error_ region
region
= wsi_compositor_create_region(g_compositor);
undefined identifier `wl_region`
undefined identifier `wsi_compositor_create_region`
wsi_region_add(region, g_confineRect[0], g_confineRect[1],
undefined identifier `wsi_region_add`
g_confineRect[2], g_confineRect[3]); g_confined = wsi_confine_pointer(g_constraints, g_surface, g_pointer, region, ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT); wsi_confined_add_listener(g_confined, &g_confinedListener, null);
undefined identifier `wsi_confined_add_listener`
wsi_region_destroy(region);
undefined identifier `wsi_region_destroy`
instrEvent("confine_request", "rect=%d,%d %dx%d lifetime=persistent focus=%d",
undefined identifier `instrEvent`, did you mean import `instrument`?
g_confineRect[0], g_confineRect[1], g_confineRect[2], g_confineRect[3], g_haveFocus ? 1 : 0); } /// (Re)arm the constraint the current phase needs. Called on every pointer /// (re)creation; persistent objects survive the flap, so only create when /// none exists. void
void app.ensureConstraint() nothrow @nogc

(Re)arm the constraint the current phase needs. Called on every pointer (re)creation; persistent objects survive the flap, so only create when none exists.

ensureConstraint
() nothrow @nogc
{ if (g_constraints is null ||
(__gshared global) bool app.g_passive
g_passive
)
return; final switch (
(__gshared global) app.Phase app.g_phase
g_phase
)
{ case
(enum) app.Phase
Phase
.
(enum value) app.Phase.pre = 0
pre
:
break; case
(enum) app.Phase
Phase
.
(enum value) app.Phase.lockOneshot = 1
lockOneshot
:
if (g_locked is null)
void app.createLock(uint lifetime, const(char)* label) nothrow @nogc

Request a pointer lock for the current phase. Called right after the wl_pointer is (re)created on a capability gain — i.e. while the pointer has no focus on the surface yet, which is the async-failable contract under test: locked may only fire once the pointer enters the surface.

createLock
(ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT, "first-oneshot");
undefined identifier `ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT`
break; case
(enum) app.Phase
Phase
.
(enum value) app.Phase.relockOneshot = 2
relockOneshot
:
if (g_locked is null)
void app.createLock(uint lifetime, const(char)* label) nothrow @nogc

Request a pointer lock for the current phase. Called right after the wl_pointer is (re)created on a capability gain — i.e. while the pointer has no focus on the surface yet, which is the async-failable contract under test: locked may only fire once the pointer enters the surface.

createLock
(ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT, "new-object-after-oneshot");
undefined identifier `ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT`
break; case
(enum) app.Phase
Phase
.
(enum value) app.Phase.lockPersistent = 3
lockPersistent
:
if (g_locked is null)
void app.createLock(uint lifetime, const(char)* label) nothrow @nogc

Request a pointer lock for the current phase. Called right after the wl_pointer is (re)created on a capability gain — i.e. while the pointer has no focus on the surface yet, which is the async-failable contract under test: locked may only fire once the pointer enters the surface.

createLock
(ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT, "persistent");
undefined identifier `ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT`
break; case
(enum) app.Phase
Phase
.
(enum value) app.Phase.confine = 4
confine
:
if (g_confined is null)
void app.createConfine() nothrow @nogc

Confine to the center half of the window — a real wl_region, destroyed right after the request (the compositor copies the region contents).

createConfine
();
break; } } extern (C) void
app.onLocked
onLocked
(void* data, zwp_locked_pointer_v1* lp) nothrow @nogc
undefined identifier `zwp_locked_pointer_v1`
{ g_lockActive = true; g_lockActivations++; instrEvent("locked", "phase=%s object=%d activation=%d", g_phaseNames[g_phase], g_lockObjects, g_lockActivations); if (g_phase == Phase.
Phase.lockPersistent
lockPersistent
&& g_lockActivations >= 2)
{ // The persistent lifetime is proven (a 2nd `locked` on the SAME // object, no new request). Now the unlock-restoration test: hint a // cursor position, commit (the hint is double-buffered state), and // destroy while active — "when unlocking, the compositor may warp // the cursor position to the set cursor position hint". wsi_locked_set_cursor_position_hint(g_locked, hintX * 256, hintY * 256); wsi_surface_commit(g_surface); g_hintSet = true; instrEvent("cursor_position_hint", "x=%d y=%d note=committed-then-client-unlock", hintX, hintY); wsi_locked_destroy(g_locked); g_locked = null; g_lockActive = false; instrEvent("lock_destroyed", "reason=client-unlock-with-hint"); setPhase(Phase.
Phase.confine
confine
);
ensureConstraint(); // pointer is alive and focused right now } } extern (C) void
app.onUnlocked
onUnlocked
(void* data, zwp_locked_pointer_v1* lp) nothrow @nogc
undefined identifier `zwp_locked_pointer_v1`
{ g_lockActive = false; instrEvent("unlocked", "phase=%s object=%d activations=%d", g_phaseNames[g_phase], g_lockObjects, g_lockActivations); final switch (g_phase) { case Phase.
Phase.lockOneshot
lockOneshot
:
// "If this is a oneshot pointer lock this object is now defunct and // should be destroyed." wsi_locked_destroy(g_locked); g_locked = null; instrEvent("lock_destroyed", "reason=oneshot-defunct"); setPhase(Phase.
Phase.relockOneshot
relockOneshot
);
break; case Phase.
Phase.relockOneshot
relockOneshot
:
wsi_locked_destroy(g_locked); g_locked = null; instrEvent("lock_destroyed", "reason=oneshot-defunct"); setPhase(Phase.
Phase.lockPersistent
lockPersistent
);
break; case Phase.
Phase.lockPersistent
lockPersistent
:
// Persistent: the object stays valid and "may again reactivate". instrEvent("lock_kept", "note=persistent-object-retained-for-reactivation"); break; case Phase.
Phase.pre
pre
:
case Phase.
Phase.confine
confine
:
break; } } extern (C) void
app.onConfined
onConfined
(void* data, zwp_confined_pointer_v1* cp) nothrow @nogc
undefined identifier `zwp_confined_pointer_v1`
{ g_confineActive = true; instrEvent("confined", "rect=%d,%d %dx%d", g_confineRect[0], g_confineRect[1], g_confineRect[2], g_confineRect[3]); } extern (C) void
app.onUnconfined
onUnconfined
(void* data, zwp_confined_pointer_v1* cp) nothrow @nogc
undefined identifier `zwp_confined_pointer_v1`
{ g_confineActive = false; instrEvent("unconfined", "note=persistent-object-retained"); } extern (C) void
app.onRelativeMotion
onRelativeMotion
(void* data, zwp_relative_pointer_v1* rp,
undefined identifier `zwp_relative_pointer_v1`
uint utimeHi, uint utimeLo, int dx, int dy, int dxUnaccel, int dyUnaccel) nothrow @nogc { g_relEvents++; if (dx != dxUnaccel || dy != dyUnaccel) g_unaccelDiffered = true; g_yaw += dx / 256.0 * 0.25; // the mouselook angle readout the deltas drive g_pitch += dy / 256.0 * 0.25; instrEvent("relative_motion", "dx=%.2f dy=%.2f dx_unaccel=%.2f dy_unaccel=%.2f locked=%d yaw=%.1f pitch=%.1f", dx / 256.0, dy / 256.0, dxUnaccel / 256.0, dyUnaccel / 256.0, g_lockActive ? 1 : 0, g_yaw, g_pitch); } __gshared zwp_locked_pointer_v1_listener
_error_ app.g_lockedListener
g_lockedListener
= {&onLocked, &onUnlocked};
undefined identifier `zwp_locked_pointer_v1_listener`
__gshared zwp_confined_pointer_v1_listener
_error_ app.g_confinedListener
g_confinedListener
= {&onConfined, &onUnconfined};
undefined identifier `zwp_confined_pointer_v1_listener`
__gshared zwp_relative_pointer_v1_listener
_error_ app.g_relativeListener
g_relativeListener
= {&onRelativeMotion};
undefined identifier `zwp_relative_pointer_v1_listener`
// ---------------------------------------------------------------- listeners extern (C) void
app.onPointerEnter
onPointerEnter
(void* data, wl_pointer*
(parameter) wl_pointer* p
p
, uint serial,
undefined identifier `wl_pointer`, did you mean variable `g_pointer`?
wl_surface* surf, int sx, int sy) nothrow @nogc
undefined identifier `wl_surface`, did you mean variable `g_surface`?
{ g_haveFocus = true; instrEvent("pointer_enter", "serial=%u pos=%.2f,%.2f phase=%s", serial, sx / 256.0, sy / 256.0, g_phaseNames[g_phase]); } extern (C) void
app.onPointerLeave
onPointerLeave
(void* data, wl_pointer*
(parameter) wl_pointer* p
p
, uint serial, wl_surface* surf) nothrow @nogc
undefined identifier `wl_pointer`, did you mean variable `g_pointer`?
undefined identifier `wl_surface`, did you mean variable `g_surface`?
{ g_haveFocus = false; instrEvent("pointer_leave", "serial=%u", serial); } extern (C) void
app.onPointerMotion
onPointerMotion
(void* data, wl_pointer*
(parameter) wl_pointer* p
p
, uint time, int sx, int sy) nothrow @nogc
undefined identifier `wl_pointer`, did you mean variable `g_pointer`?
{ g_absMotions++; immutable
_error_ x
x
= sx / 256.0,
_error_ y
y
= sy / 256.0;
if (g_lockActive) { // The contract under test: "while a pointer is locked, the wl_pointer // objects of the corresponding seat will not emit any // wl_pointer.motion events". Any line here is a violation. g_absWhileLocked++; instrEvent("motion_while_locked", "x=%.2f y=%.2f note=CONTRACT-VIOLATION", x, y); return; } if (g_hintSet && g_entersAfterHint == 0) { g_entersAfterHint = 1; // The position-hint verification: the cursor was at the lock position // when the lock was destroyed; if the compositor warped it to // (hintX, hintY), the first post-unlock motion lands at hint + the // injected delta. instrEvent("hint_verify", "hint=%d,%d first_motion=%.2f,%.2f note=expect-hint-plus-one-delta", hintX, hintY, x, y); } instrEvent("motion", "x=%.2f y=%.2f phase=%s confined=%d", x, y, g_phaseNames[g_phase], g_confineActive ? 1 : 0); if (g_phase == Phase.
Phase.confine
confine
&& g_confineActive)
{ if (x < g_cMinX) g_cMinX = x; if (y < g_cMinY) g_cMinY = y; if (x > g_cMaxX) g_cMaxX = x; if (y > g_cMaxY) g_cMaxY = y; } } extern (C) void
app.onPointerButton
onPointerButton
(void* data, wl_pointer*
(parameter) wl_pointer* p
p
, uint serial, uint time,
undefined identifier `wl_pointer`, did you mean variable `g_pointer`?
uint button, uint state) nothrow @nogc {} extern (C) void
app.onPointerAxis
onPointerAxis
(void* data, wl_pointer*
(parameter) wl_pointer* p
p
, uint time, uint axis, int value) nothrow @nogc {}
undefined identifier `wl_pointer`, did you mean variable `g_pointer`?
extern (C) void
app.onPointerFrame
onPointerFrame
(void* data, wl_pointer*
(parameter) wl_pointer* p
p
) nothrow @nogc {}
undefined identifier `wl_pointer`, did you mean variable `g_pointer`?
extern (C) void
app.onPointerAxisSource
onPointerAxisSource
(void* data, wl_pointer*
(parameter) wl_pointer* p
p
, uint src) nothrow @nogc {}
undefined identifier `wl_pointer`, did you mean variable `g_pointer`?
extern (C) void
app.onPointerAxisStop
onPointerAxisStop
(void* data, wl_pointer*
(parameter) wl_pointer* p
p
, uint time, uint axis) nothrow @nogc {}
undefined identifier `wl_pointer`, did you mean variable `g_pointer`?
extern (C) void
app.onPointerAxisDiscrete
onPointerAxisDiscrete
(void* data, wl_pointer*
(parameter) wl_pointer* p
p
, uint axis, int discrete) nothrow @nogc {}
undefined identifier `wl_pointer`, did you mean variable `g_pointer`?
extern (C) void
app.onPointerAxisValue120
onPointerAxisValue120
(void* data, wl_pointer*
(parameter) wl_pointer* p
p
, uint axis, int v120) nothrow @nogc {}
undefined identifier `wl_pointer`, did you mean variable `g_pointer`?
extern (C) void
app.onPointerAxisRelDir
onPointerAxisRelDir
(void* data, wl_pointer*
(parameter) wl_pointer* p
p
, uint axis, uint dir) nothrow @nogc {}
undefined identifier `wl_pointer`, did you mean variable `g_pointer`?
__gshared wl_pointer_listener
_error_ app.g_pointerListener
g_pointerListener
= {
undefined identifier `wl_pointer_listener`
&onPointerEnter, &onPointerLeave, &onPointerMotion, &onPointerButton, &onPointerAxis, &onPointerFrame, &onPointerAxisSource, &onPointerAxisStop, &onPointerAxisDiscrete, &onPointerAxisValue120, &onPointerAxisRelDir }; extern (C) void
app.onSeatCapabilities
onSeatCapabilities
(void* data, wl_seat*
(parameter) wl_seat* s
s
, uint caps) nothrow @nogc
undefined identifier `wl_seat`, did you mean variable `g_seat`?
{ immutable
_error_ hasPointer
hasPointer
= (caps & WL_SEAT_CAPABILITY_POINTER) != 0;
instrEvent("seat_capabilities", "caps=%u pointer=%d", caps, hasPointer ? 1 : 0); if (hasPointer && g_pointer is null) { g_pointer = wsi_seat_get_pointer(g_seat); wsi_pointer_add_listener(g_pointer, &g_pointerListener, null); if (g_relMgr !is null) { // One relative pointer per wl_pointer; it "shares the same focus // as wl_pointer objects of the same seat" and reports deltas // locked or not. g_relPointer = wsi_get_relative_pointer(g_relMgr, g_pointer); wsi_relative_add_listener(g_relPointer, &g_relativeListener, null); } // The constraint is requested NOW — before any enter, i.e. while the // pointer is outside/unfocused. `locked` must wait for entry. ensureConstraint(); } else if (!hasPointer && g_pointer !is null) { // Capability flap (the wlrctl device unplugged): destroy and // re-create per the wl_seat.capabilities contract. The constraint // objects are NOT destroyed here — whether they survive the flap is // a finding (persistent should; oneshot is already defunct). if (g_relPointer !is null) wsi_relative_destroy(g_relPointer); g_relPointer = null; wsi_pointer_destroy(g_pointer); g_pointer = null; g_haveFocus = false; instrEvent("pointer_dropped", "note=capability removed; wl_pointer+relative destroyed"); if (g_phase == Phase.
Phase.pre
pre
&& g_absMotions > 0)
setPhase(Phase.
Phase.lockOneshot
lockOneshot
); // next plug requests the first lock
} } extern (C) void
app.onSeatName
onSeatName
(void* data, wl_seat*
(parameter) wl_seat* s
s
, const(char)* name) nothrow @nogc {}
undefined identifier `wl_seat`, did you mean variable `g_seat`?
extern (C) void
app.onGlobal
onGlobal
(void* data, wl_registry* reg, uint name,
undefined identifier `wl_registry`, did you mean variable `g_registry`?
const(char)* iface, uint ver) nothrow @nogc { static uint
uint capped(uint advertised, uint want) nothrow @nogc
capped
(uint
(parameter) uint advertised
advertised
, uint
(parameter) uint want
want
) nothrow @nogc
{ return advertised < want ? advertised : want; } if (strcmp(iface, wl_compositor_interface.name) == 0) g_compositor = cast(wl_compositor*) wsi_registry_bind(reg, name, &wl_compositor_interface, capped(ver, 6)); else if (strcmp(iface, wl_shm_interface.name) == 0) g_shm = cast(wl_shm*) wsi_registry_bind(reg, name, &wl_shm_interface, 1); else if (strcmp(iface, xdg_wm_base_interface.name) == 0) g_wmBase = cast(xdg_wm_base*) wsi_registry_bind(reg, name, &xdg_wm_base_interface, 1); else if (strcmp(iface, wl_seat_interface.name) == 0 && g_seat is null) { g_seat = cast(wl_seat*) wsi_registry_bind(reg, name, &wl_seat_interface, capped(ver, 5)); wsi_seat_add_listener(g_seat, &g_seatListener, null); } else if (strcmp(iface, zwp_pointer_constraints_v1_interface.name) == 0) g_constraints = cast(zwp_pointer_constraints_v1*) wsi_registry_bind(reg, name, &zwp_pointer_constraints_v1_interface, 1); else if (strcmp(iface, zwp_relative_pointer_manager_v1_interface.name) == 0) g_relMgr = cast(zwp_relative_pointer_manager_v1*) wsi_registry_bind(reg, name, &zwp_relative_pointer_manager_v1_interface, 1); } extern (C) void
app.onGlobalRemove
onGlobalRemove
(void* data, wl_registry* reg, uint name) nothrow @nogc {}
undefined identifier `wl_registry`, did you mean variable `g_registry`?
// ------------------------------------------------ window plumbing (scaffold) bool
app.ensureBuffer
ensureBuffer
(ref
(struct) app.Buffer
Buffer
(parameter) Buffer b
b
, int
(parameter) int w
w
, int
(parameter) int h
h
) nothrow @nogc
{ if (b.
b.handle
handle
!is null && (b.
b.width
width
!= w || b.
b.height
height
!= h))
{ wsi_buffer_destroy(b.
b.handle
handle
);
munmap(b.
b.pixels
pixels
, b.
b.byteSize
byteSize
);
b = Buffer.init; } if (b.
b.handle
handle
!is null)
return true; immutable
_error_ stride
stride
= w * 4;
immutable
_error_ size
size
= cast(
(unresolved type) size_t
size_t
) stride * h;
immutable
_error_ fd
fd
= memfd_create("wsi-f10", MFD_CLOEXEC);
if (fd < 0 || ftruncate(fd, cast(long) size) != 0) return false; void*
_error_ mem
mem
= mmap(null, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (mem is cast(void*)-1) { close(fd); return false; } wl_shm_pool*
_error_ pool
pool
= wsi_shm_create_pool(g_shm, fd, cast(int) size);
b.
b.handle
handle
= wsi_shm_pool_create_buffer(pool, 0, w, h, stride, WL_SHM_FORMAT_ARGB8888);
wsi_shm_pool_destroy(pool); close(fd); wsi_buffer_add_listener(b.
b.handle
handle
, &g_bufferListener, &b);
b.
b.pixels
pixels
= cast(uint*) mem;
b.
b.byteSize
byteSize
= size;
b.
b.width
width
= w;
b.
b.height
height
= h;
return true; } /// Phase-tinted background + the confine region outlined + a crosshair the /// relative deltas drive — the minimal "visible angle readout". void
void app.render() nothrow @nogc

Phase-tinted background + the confine region outlined + a crosshair the relative deltas drive — the minimal "visible angle readout".

render
() nothrow @nogc
{
(struct) app.Buffer
Buffer
*
(local variable) _error_ buf
buf
= null;
foreach (ref
(parameter) b
b
; g_buffers)
if (!b.
b.busy
busy
)
{ buf = &b; break; } if (buf is null || !ensureBuffer(*buf, g_width, g_height)) return; immutable uint
(local variable) immutable(uint) tint
tint
=
(__gshared global) bool app.g_lockActive
g_lockActive
? 0xff602020
: (
(__gshared global) bool app.g_confineActive
g_confineActive
? 0xff206020 : 0xff202840);
immutable
(local variable) immutable(int) cx
cx
=
(__gshared global) int app.g_width
g_width
/ 2 + cast(int)(
(__gshared global) double app.g_yaw
g_yaw
* 4) % (
(__gshared global) int app.g_width
g_width
/ 2);
immutable
(local variable) immutable(int) cy
cy
=
(__gshared global) int app.g_height
g_height
/ 2 + cast(int)(
(__gshared global) double app.g_pitch
g_pitch
* 4) % (
(__gshared global) int app.g_height
g_height
/ 2);
foreach (
(parameter) y
y
; 0 .. buf.
(field) _error_ buf.height
height
)
foreach (
(parameter) x
x
; 0 .. buf.
buf.width
width
)
{ uint
_error_ c
c
= tint;
if (g_phase == Phase.
Phase.confine
confine
&& (x == g_confineRect[0] || x == g_confineRect[0] + g_confineRect[2] - 1 || y == g_confineRect[1] || y == g_confineRect[1] + g_confineRect[3] - 1) && x >= g_confineRect[0] && x < g_confineRect[0] + g_confineRect[2] && y >= g_confineRect[1] && y < g_confineRect[1] + g_confineRect[3]) c = 0xff80ff80; // confine region outline if ((y == cy && x >= cx - 8 && x <= cx + 8) || (x == cx && y >= cy - 8 && y <= cy + 8)) c = 0xffffffff; // crosshair buf.
buf.pixels
pixels
[cast(
(unresolved type) size_t
size_t
) y * buf.
buf.width
width
+ x] = c;
} wsi_surface_attach(g_surface, buf.
buf.handle
handle
, 0, 0);
undefined identifier `wsi_surface_attach`
wsi_surface_damage_buffer(g_surface, 0, 0, buf.
buf.width
width
, buf.
buf.height
height
);
undefined identifier `wsi_surface_damage_buffer`
if (g_frameCb is null) { g_frameCb = wsi_surface_frame(g_surface); wsi_callback_add_listener(g_frameCb, &g_frameListener, null);
undefined identifier `wsi_callback_add_listener`
} wsi_surface_commit(g_surface);
undefined identifier `wsi_surface_commit`
buf.
buf.busy
busy
= true;
(__gshared global) int app.g_commits
g_commits
++;
} extern (C) void
app.onWmBasePing
onWmBasePing
(void* data, xdg_wm_base*
(parameter) xdg_wm_base* b
b
, uint serial) nothrow @nogc
undefined identifier `xdg_wm_base`
{ wsi_wm_base_pong(b, serial); } extern (C) void
app.onToplevelConfigure
onToplevelConfigure
(void* data, xdg_toplevel* t, int
(parameter) int w
w
, int
(parameter) int h
h
,
undefined identifier `xdg_toplevel`, did you mean variable `g_toplevel`?
wl_array* states) nothrow @nogc
undefined identifier `wl_array`
{ g_pendingWidth = w; g_pendingHeight = h; } extern (C) void
app.onXdgSurfaceConfigure
onXdgSurfaceConfigure
(void* data, xdg_surface*
(parameter) xdg_surface* s
s
, uint serial) nothrow @nogc
undefined identifier `xdg_surface`, did you mean variable `g_surface`?
{ immutable
_error_ w
w
= g_pendingWidth > 0 ? g_pendingWidth : defaultWidth;
immutable
_error_ h
h
= g_pendingHeight > 0 ? g_pendingHeight : defaultHeight;
instrEvent("configure", "serial=%u size=%dx%d", serial, w, h); wsi_xdg_surface_ack_configure(s, serial); immutable
_error_ resized
resized
= w != g_width || h != g_height;
g_width = w; g_height = h; if (!g_configured) { g_configured = true; instrFirstConfigure(); render(); } else if (resized) render(); } extern (C) void
app.onToplevelClose
onToplevelClose
(void* data, xdg_toplevel* t) nothrow @nogc
undefined identifier `xdg_toplevel`, did you mean variable `g_toplevel`?
{ instrCloseRequested(); g_running = false; } extern (C) void
app.onToplevelConfigureBounds
onToplevelConfigureBounds
(void* data, xdg_toplevel* t, int
(parameter) int w
w
, int
(parameter) int h
h
) nothrow @nogc {}
undefined identifier `xdg_toplevel`, did you mean variable `g_toplevel`?
extern (C) void
app.onToplevelWmCapabilities
onToplevelWmCapabilities
(void* data, xdg_toplevel* t, wl_array* caps) nothrow @nogc {}
undefined identifier `xdg_toplevel`, did you mean variable `g_toplevel`?
undefined identifier `wl_array`
extern (C) void
app.onBufferRelease
onBufferRelease
(void* data, wl_buffer*
(parameter) wl_buffer* b
b
) nothrow @nogc
undefined identifier `wl_buffer`
{ (cast(
(unresolved type) Buffer
Buffer
*) data).
(cast(Buffer*)data).busy
busy
= false;
if (g_running && g_configured && g_frameCb is null) render(); } extern (C) void
app.onFrameDone
onFrameDone
(void* data, wl_callback* cb, uint timeMs) nothrow @nogc
undefined identifier `wl_callback`
{ wsi_callback_destroy(cb); g_frameCb = null; g_frames++; if (g_frames == 1) instrFirstPixelPresented(); render(); } __gshared wl_registry_listener
_error_ app.g_registryListener
g_registryListener
= {&onGlobal, &onGlobalRemove};
undefined identifier `wl_registry_listener`
__gshared wl_seat_listener
_error_ app.g_seatListener
g_seatListener
= {&onSeatCapabilities, &onSeatName};
undefined identifier `wl_seat_listener`
__gshared xdg_wm_base_listener
_error_ app.g_wmBaseListener
g_wmBaseListener
= {&onWmBasePing};
undefined identifier `xdg_wm_base_listener`
__gshared xdg_surface_listener
_error_ app.g_xdgSurfaceListener
g_xdgSurfaceListener
= {&onXdgSurfaceConfigure};
undefined identifier `xdg_surface_listener`
__gshared xdg_toplevel_listener
_error_ app.g_toplevelListener
g_toplevelListener
= {
undefined identifier `xdg_toplevel_listener`
&onToplevelConfigure, &onToplevelClose, &onToplevelConfigureBounds, &onToplevelWmCapabilities }; __gshared wl_buffer_listener
_error_ app.g_bufferListener
g_bufferListener
= {&onBufferRelease};
undefined identifier `wl_buffer_listener`
__gshared wl_callback_listener
_error_ app.g_frameListener
g_frameListener
= {&onFrameDone};
undefined identifier `wl_callback_listener`
// --------------------------------------------------------------------- main int
int D main(string[] args)
main
(
(alias) object.string = string
string
[]
(parameter) string[] args
args
)
{ // Self-contained input injection: `f10_pointer_capture inject …` plugs a // zwlr_virtual_pointer_v1 device in and streams motions (see ./inject.d). // NB: druntime packs main's args into one contiguous buffer WITHOUT NUL // terminators between them — atoi(args[i].ptr) reads the neighbours too. static int
int app.main.parseInt(in char[] s) pure nothrow @nogc @safe
parseInt
(in char[]
(parameter) const(char[]) s
s
) nothrow @nogc
{ int
(local variable) int v
v
;
bool
(local variable) bool neg
neg
;
foreach (
(parameter) ulong i
i
,
(parameter) const(char) ch
ch
;
(parameter) const(char[]) s
s
)
{ if (
(local variable) ulong i
i
== 0 &&
(local variable) const(char) ch
ch
== '-')
(local variable) bool neg
neg
= true;
else if (
(local variable) const(char) ch
ch
>= '0' &&
(local variable) const(char) ch
ch
<= '9')
(local variable) int v
v
=
(local variable) int v
v
* 10 + (
(local variable) const(char) ch
ch
- '0');
} return
(local variable) bool neg
neg
? -
(local variable) int v
v
:
(local variable) int v
v
;
} if (
(parameter) string[] args
args
.
(field) ulong string[].length
length
== 7 &&
(parameter) string[] args
args
[1] == "inject")
{ import inject : injectMain;
unable to read module `inject` Expected 'inject.d' or 'inject/package.d' in one of the following import paths:
return injectMain(parseInt(args[2]), parseInt(args[3]),
undefined identifier `injectMain`
parseInt(args[4]), parseInt(args[5]), parseInt(args[6])); } // WSI_PASSIVE=1: be a plain window only (no constraints) — ./run.sh runs // one as the focus-steal target that triggers compositor deactivation. const
(local variable) const(char*) passiveEnv
passiveEnv
=
char* core.stdc.stdlib.getenv(scope const(char*) name) nothrow @nogc
getenv
("WSI_PASSIVE");
(__gshared global) bool app.g_passive
g_passive
=
(local variable) const(char*) passiveEnv
passiveEnv
!is null && *
(local variable) const(char*) passiveEnv
passiveEnv
== '1';
instrInit(g_passive ? "f10_passive" : "f10_wayland");
undefined identifier `instrInit`
const
(local variable) const(char*) autoEnv
autoEnv
=
char* core.stdc.stdlib.getenv(scope const(char*) name) nothrow @nogc
getenv
("WSI_AUTO_EXIT");
(__gshared global) bool app.g_autoExit
g_autoExit
=
(local variable) const(char*) autoEnv
autoEnv
!is null && *
(local variable) const(char*) autoEnv
autoEnv
== '1';
const
(local variable) const(char*) runMs
runMs
=
char* core.stdc.stdlib.getenv(scope const(char*) name) nothrow @nogc
getenv
("WSI_RUN_MS");
if (
(local variable) const(char*) runMs
runMs
!is null)
(__gshared global) long app.g_runUsCap
g_runUsCap
=
int core.stdc.stdlib.atoi(scope const(char*) nptr) nothrow @nogc
atoi
(
(local variable) const(char*) runMs
runMs
) * 1000L;
g_display = wl_display_connect(null); if (g_display is null) {
int core.stdc.stdio.printf(scope const(char*) format, scope const ...) nothrow @nogc
printf
("SKIP: no Wayland compositor (wl_display_connect returned null)\n");
return 0; } g_registry = wsi_display_get_registry(g_display); wsi_registry_add_listener(g_registry, &g_registryListener, null);
undefined identifier `wsi_registry_add_listener`
wl_display_roundtrip(g_display); // globals
undefined identifier `wl_display_roundtrip`
wl_display_roundtrip(g_display); // seat capabilities
undefined identifier `wl_display_roundtrip`
if (g_compositor is null || g_shm is null || g_wmBase is null) {
int core.stdc.stdio.printf(scope const(char*) format, scope const ...) nothrow @nogc
printf
("SKIP: compositor lacks a required global\n");
wl_display_disconnect(g_display);
undefined identifier `wl_display_disconnect`
return 0; } // The per-compositor capability answer, logged before anything else runs. instrEvent("globals", "pointer_constraints=%d relative_pointer_manager=%d seat=%d",
undefined identifier `instrEvent`, did you mean import `instrument`?
g_constraints !is null ? 1 : 0, g_relMgr !is null ? 1 : 0, g_seat !is null ? 1 : 0); if (g_seat is null) { // headless weston: no seat at all → no pointer, no constraints to // exercise; the registry probe above is the Tier-A evidence.
int core.stdc.stdio.printf(scope const(char*) format, scope const ...) nothrow @nogc
printf
("ok: no seat on this compositor; registry probe only\n");
wl_display_disconnect(g_display);
undefined identifier `wl_display_disconnect`
return 0; } // Headless sway: the seat starts at capabilities=0 and get_pointer before // the capability ever existed is a fatal wlroots protocol error — the // demo strictly waits for a capabilities event (./run.sh plugs a wlrctl // virtual pointer in). wsi_wm_base_add_listener(g_wmBase, &g_wmBaseListener, null);
undefined identifier `wsi_wm_base_add_listener`
g_surface = wsi_compositor_create_surface(g_compositor); g_xdgSurface = wsi_wm_base_get_xdg_surface(g_wmBase, g_surface); wsi_xdg_surface_add_listener(g_xdgSurface, &g_xdgSurfaceListener, null);
undefined identifier `wsi_xdg_surface_add_listener`
g_toplevel = wsi_xdg_surface_get_toplevel(g_xdgSurface); wsi_toplevel_add_listener(g_toplevel, &g_toplevelListener, null);
undefined identifier `wsi_toplevel_add_listener`
const
(local variable) const(immutable(char)*) appId
appId
=
(__gshared global) bool app.g_passive
g_passive
? "wsi-f10-passive".
(constant) immutable(char)* "wsi-f10-passive".ptr = "wsi-f10-passive"
ptr
: "wsi-f10-pointer-capture".
(constant) immutable(char)* "wsi-f10-pointer-capture".ptr = "wsi-f10-pointer-capture"
ptr
;
wsi_toplevel_set_title(g_toplevel, appId);
undefined identifier `wsi_toplevel_set_title`
wsi_toplevel_set_app_id(g_toplevel, appId);
undefined identifier `wsi_toplevel_set_app_id`
instrWindowCreated();
undefined identifier `instrWindowCreated`
wsi_surface_commit(g_surface); // mandatory no-buffer first commit
undefined identifier `wsi_surface_commit`
immutable
(local variable) immutable(_error_) dispFd
dispFd
= wl_display_get_fd(g_display);
undefined identifier `wl_display_get_fd`
while (
(__gshared global) bool app.g_running
g_running
)
{ while (wl_display_prepare_read(g_display) != 0)
undefined identifier `wl_display_prepare_read`
wl_display_dispatch_pending(g_display);
undefined identifier `wl_display_dispatch_pending`
wl_display_flush(g_display);
undefined identifier `wl_display_flush`
pollfd
(local variable) _error_ pfd
pfd
= {dispFd, POLLIN, 0};
undefined identifier `pollfd`
if (poll(&pfd, 1, 50) > 0)
undefined identifier `poll`
wl_display_read_events(g_display);
undefined identifier `wl_display_read_events`
else wl_display_cancel_read(g_display);
undefined identifier `wl_display_cancel_read`
if (wl_display_dispatch_pending(g_display) == -1)
undefined identifier `wl_display_dispatch_pending`
break; if (
(__gshared global) bool app.g_autoExit
g_autoExit
&& instrNowUs() >
(__gshared global) long app.g_runUsCap
g_runUsCap
)
undefined identifier `instrNowUs`
(__gshared global) bool app.g_running
g_running
= false;
} instrEvent("summary",
undefined identifier `instrEvent`, did you mean import `instrument`?
"phase_reached=%s lock_objects=%d abs_motions=%d abs_while_locked=%d rel_events=%d unaccel_differed=%d", g_phaseNames[g_phase], g_lockObjects, g_absMotions, g_absWhileLocked, g_relEvents, g_unaccelDiffered ? 1 : 0); if (
(__gshared global) double app.g_cMaxX
g_cMaxX
> -1e9)
instrEvent("confine_summary", "rect=%d,%d %dx%d min=%.2f,%.2f max=%.2f,%.2f",
undefined identifier `instrEvent`, did you mean import `instrument`?
g_confineRect[0], g_confineRect[1], g_confineRect[2], g_confineRect[3], g_cMinX, g_cMinY, g_cMaxX, g_cMaxY); // Teardown: children before parents. foreach (ref
(parameter) b
b
; g_buffers)
if (b.
b.handle
handle
!is null)
{ wsi_buffer_destroy(b.
b.handle
handle
);
munmap(b.
b.pixels
pixels
, b.
b.byteSize
byteSize
);
} if (g_frameCb !is null) wsi_callback_destroy(g_frameCb);
undefined identifier `wsi_callback_destroy`
if (g_locked !is null) wsi_locked_destroy(g_locked);
undefined identifier `wsi_locked_destroy`
if (g_confined !is null) wsi_confined_destroy(g_confined);
undefined identifier `wsi_confined_destroy`
if (g_relPointer !is null) wsi_relative_destroy(g_relPointer);
undefined identifier `wsi_relative_destroy`
if (g_constraints !is null) wsi_constraints_destroy(g_constraints);
undefined identifier `wsi_constraints_destroy`
if (g_relMgr !is null) wsi_relative_manager_destroy(g_relMgr);
undefined identifier `wsi_relative_manager_destroy`
if (g_pointer !is null) wsi_pointer_destroy(g_pointer);
undefined identifier `wsi_pointer_destroy`
if (g_seat !is null) wsi_seat_destroy(g_seat);
undefined identifier `wsi_seat_destroy`
wsi_toplevel_destroy(g_toplevel);
undefined identifier `wsi_toplevel_destroy`
wsi_xdg_surface_destroy(g_xdgSurface);
undefined identifier `wsi_xdg_surface_destroy`
wsi_surface_destroy(g_surface);
undefined identifier `wsi_surface_destroy`
wsi_wm_base_destroy(g_wmBase);
undefined identifier `wsi_wm_base_destroy`
wl_proxy_destroy(cast(wl_proxy*) g_shm);
undefined identifier `wl_proxy_destroy`
wl_proxy_destroy(cast(wl_proxy*) g_compositor);
undefined identifier `wl_proxy_destroy`
wl_proxy_destroy(cast(wl_proxy*) g_registry);
undefined identifier `wl_proxy_destroy`
wl_display_disconnect(g_display);
undefined identifier `wl_display_disconnect`
int core.stdc.stdio.printf(scope const(char*) format, scope const ...) nothrow @nogc
printf
("ok: frames=%d commits=%d phase=%s lock_objects=%d abs_while_locked=%d\n",
(__gshared global) int app.g_frames
g_frames
,
(__gshared global) int app.g_commits
g_commits
,
(immutable global) immutable(char*[5]) app.g_phaseNames
g_phaseNames
[
(__gshared global) app.Phase app.g_phase
g_phase
],
(__gshared global) int app.g_lockObjects
g_lockObjects
,
(__gshared global) int app.g_absWhileLocked
g_absWhileLocked
);
return 0; }