fix: guard tiling preview without grabbed view - #4
Open
mateoalfaro wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
labwc aborts with an assertion failure when a tiling drop preview is requested
without an active interactive move, taking down the whole session:
This repeats on every session start (~4s in, SIGABRT), and even the session
wrapper's software-rendering retry crashes with the same assertion, so the
desktop never comes up.
Root cause
view_is_floating()asserts on a non-NULL view, but two tiling-preview callsites pass
server.grabbed_view, which is only set during an interactivemove. Overlay updates can also be requested by the singularity-tiling protocol
while no move is active, so the NULL grabbed view reaches the assertion.
Changes
src/interactive.c(edge_from_cursor): return early when there is noserver.grabbed_view— with no grabbed view there is no edge-snap candidate.src/regions.c(regions_should_snap): add the same!server.grabbed_viewguard alongside the existing snap conditions.
src/protocols/singularity-tiling.c(handle_set_drop_preview): if thedrop preview is not active, finish the overlay and return instead of calling
overlay_update()on stale state.Testing
triggers and the session stays up past the previous ~4s crash point.
view_is_floating()call sites: remaining callers either hold avalid view or already NULL-check.
Logs
Crash from
~/.local/state/singularity/labwc.log:Fix tested on NixOS 26.11