Skip to content

RediWM is a Wayland compositor written in Zig (OpenGL ES) that includes everything in one process

editor: fix shadowed capture and expose the window event handlers

Claude3d8b67aad425
diff --git a/src/editor/ime.zig b/src/editor/ime.zig
index 10ea603..4a60e71 100644
--- a/src/editor/ime.zig
+++ b/src/editor/ime.zig
@@ -49,13 +49,13 @@ pub const Ime = struct {
}
fn event(input: *zwp.TextInputV3, ev: zwp.TextInputV3.Event, self: *Ime) void {
switch (ev) {
- .enter => |ev| {
- if (ev.surface != self.surface) return;
+ .enter => |entered| {
+ if (entered.surface != self.surface) return;
self.entered = true;
self.revision = std.math.maxInt(usize);
},
- .leave => |ev| {
- if (ev.surface != self.surface) return;
+ .leave => |left| {
+ if (left.surface != self.surface) return;
// enable belongs to the surface from enter: disable it before
// dropping that surface, or the compositor still believes the
// input is enabled and a later enable/commit after re-entering
diff --git a/src/editor/main.zig b/src/editor/main.zig
index ba8c1b1..fb38f2d 100644
--- a/src/editor/main.zig
+++ b/src/editor/main.zig
@@ -92,15 +92,15 @@ pub const Client = struct {
pub const destroy = client_lifecycle.destroy;
pub const registryEvent = client_window.registryEvent;
pub const close = client_window.close;
- const logicalOutputEvent = client_window.logicalOutputEvent;
+ pub const logicalOutputEvent = client_window.logicalOutputEvent;
pub const recomputeScale = client_window.recomputeScale;
pub const removeEnteredOutput = client_window.removeEnteredOutput;
- const surfaceEvent = client_window.surfaceEvent;
- const xdgSurfaceEvent = client_window.xdgSurfaceEvent;
+ pub const surfaceEvent = client_window.surfaceEvent;
+ pub const xdgSurfaceEvent = client_window.xdgSurfaceEvent;
pub const wantsCsd = client_window.wantsCsd;
pub const titlebarHeight = client_window.titlebarHeight;
- const decorationEvent = client_window.decorationEvent;
- const xdgToplevelEvent = client_window.xdgToplevelEvent;
+ pub const decorationEvent = client_window.decorationEvent;
+ pub const xdgToplevelEvent = client_window.xdgToplevelEvent;
pub const pointerEvent = client_input.pointerEvent;
pub const updateCursor = client_input.updateCursor;
@@ -113,7 +113,7 @@ pub const Client = struct {
pub const handleTitlebarClick = client_input.handleTitlebarClick;
pub const deliverKey = client_input.deliverKey;
pub const appRepeats = client_input.appRepeats;
- const repeatDue = client_input.repeatDue;
+ pub const repeatDue = client_input.repeatDue;
pub const keyboardEvent = client_input.keyboardEvent;
pub const setCursor = client_input.setCursor;