Skip to content

Add wl_fixes.ack_global_remove support - #1613

Merged
wengxt merged 3 commits into
masterfrom
wl_fixes
Jul 18, 2026
Merged

Add wl_fixes.ack_global_remove support#1613
wengxt merged 3 commits into
masterfrom
wl_fixes

Conversation

@wengxt

@wengxt wengxt commented Jul 18, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added handling for pointer warp events and surface release notifications.
    • Improved global removal robustness by integrating protocol-based acknowledgements when supported.
  • Bug Fixes
    • Expanded Wayland protocol compatibility by updating supported versions and conditionally enabling newer requests/events across inputs, surfaces, compositor, shared memory, regions, seats, and data-transfer.
    • Improved “release” behavior for compositor and related objects when the newer protocol mechanisms are available.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2312ae11-fb12-4b5c-863e-a9086ecfe0e3

📥 Commits

Reviewing files that changed from the base of the PR and between 8ddedbd and cebc918.

📒 Files selected for processing (1)
  • src/lib/fcitx-wayland/core/display.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/lib/fcitx-wayland/core/display.cpp

📝 Walkthrough

Walkthrough

Wayland wrappers now advertise newer protocol versions, conditionally compile versioned requests and listeners, use release-aware destruction, and expose pointer warp and surface release operations. A conditional WlFixes wrapper acknowledges removed globals when supported.

Changes

Wayland protocol updates

Layer / File(s) Summary
Protocol versions and version-gated APIs
src/lib/fcitx-wayland/core/wl_*
Wrapper versions, requests, methods, and listener callbacks are gated by Wayland feature macros.
Release-aware object cleanup
src/lib/fcitx-wayland/core/wl_compositor.*, src/lib/fcitx-wayland/core/wl_data_device_manager.cpp
Compositor and data-device-manager cleanup uses release requests for supported protocol versions, with destroy fallbacks.
Global-removal acknowledgement
src/lib/fcitx-wayland/core/CMakeLists.txt, src/lib/fcitx-wayland/core/display.cpp, src/lib/fcitx-wayland/core/wl_fixes.*
Adds the conditional WlFixes wrapper and uses it from Display to acknowledge supported global removals.
Pointer and surface callbacks
src/lib/fcitx-wayland/core/wl_pointer.*, src/lib/fcitx-wayland/core/wl_surface.*
Forwards pointer warp events through a signal and exposes wl_surface_get_release() as a WlCallback.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • fcitx/fcitx5#1585: Adds the Display minimum-version global request plumbing used to request WlFixes.

Sequence Diagram(s)

sequenceDiagram
  participant Display
  participant WlFixes
  participant WaylandRegistry
  Display->>WlFixes: Request wl_fixes version 2
  WaylandRegistry->>Display: Notify global removal
  Display->>WlFixes: Acknowledge removed global
  WlFixes->>WaylandRegistry: Call wl_fixes_ack_global_remove
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main change: adding wl_fixes ack_global_remove support.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wl_fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/fcitx-wayland/core/display.cpp`:
- Around line 68-73: Move the conditional ackGlobalRemove logic in the
global-removal handling before globals_.erase(iter) and
localGlobalIter->second->erase(name), preserving the existing fixes/version
checks so the WlFixes proxy remains alive when acknowledged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8020ea2f-e45f-47dd-8cc3-d0d52b6283c8

📥 Commits

Reviewing files that changed from the base of the PR and between 7c1e21b and c7b5938.

📒 Files selected for processing (21)
  • src/lib/fcitx-wayland/core/CMakeLists.txt
  • src/lib/fcitx-wayland/core/display.cpp
  • src/lib/fcitx-wayland/core/wl_compositor.cpp
  • src/lib/fcitx-wayland/core/wl_compositor.h
  • src/lib/fcitx-wayland/core/wl_data_device.h
  • src/lib/fcitx-wayland/core/wl_data_device_manager.cpp
  • src/lib/fcitx-wayland/core/wl_data_device_manager.h
  • src/lib/fcitx-wayland/core/wl_data_offer.h
  • src/lib/fcitx-wayland/core/wl_data_source.h
  • src/lib/fcitx-wayland/core/wl_fixes.cpp
  • src/lib/fcitx-wayland/core/wl_fixes.h
  • src/lib/fcitx-wayland/core/wl_keyboard.h
  • src/lib/fcitx-wayland/core/wl_pointer.cpp
  • src/lib/fcitx-wayland/core/wl_pointer.h
  • src/lib/fcitx-wayland/core/wl_region.h
  • src/lib/fcitx-wayland/core/wl_seat.h
  • src/lib/fcitx-wayland/core/wl_shm.h
  • src/lib/fcitx-wayland/core/wl_shm_pool.h
  • src/lib/fcitx-wayland/core/wl_surface.cpp
  • src/lib/fcitx-wayland/core/wl_surface.h
  • src/lib/fcitx-wayland/core/wl_touch.h

Comment thread src/lib/fcitx-wayland/core/display.cpp
@wengxt
wengxt merged commit cc3a96e into master Jul 18, 2026
6 checks passed
@wengxt
wengxt deleted the wl_fixes branch July 18, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant