Repository navigation
Conversation
ShojiWM made the foreign-toplevel handles (ext-foreign-toplevel-list, wlr-foreign-toplevel-management, the Plasma window list) when a toplevel's role was made. A program that makes its window and never shows it, such as one started hidden in the notification area, then had a taskbar button for a window nobody could see. The handles now come with the toplevel's first buffer, in the commit handler; the install is idempotent, so each commit of a shown toplevel can ask.
This branch has not been deployed
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.
Problem
ShojiWM creates the foreign-toplevel handles of an xdg toplevel (ext-foreign-toplevel-list, wlr-foreign-toplevel-management, the Plasma window list) in
new_toplevel, when the toplevel role is created. Some programs create their toplevel and never show it: for example, a program started hidden in the notification area. A taskbar then shows a button for a window that nobody can see, and clicking it does nothing visible.Fix
handlers/xdg_shell.rs:new_toplevelno longer callsinstall_foreign_toplevel.handlers/compositor.rs: the commit handler callsinstall_foreign_toplevelwhen the toplevel's surface has a buffer.install_foreign_toplevelis idempotent, so each commit of a shown toplevel can call it. The call comes before the existingsync_foreign_toplevel, so title and app_id updates keep working as before.A toplevel that never attaches a buffer gets no handle. A toplevel that attaches one gets its handles on that commit.
Tests
No test is added.
cargo test --workspacepasses, except two tests that also fail on upstreammainin our environment:evaluator::tests::embedded_runtime_ipc_does_not_leak_fds_across_reloadsandinput_method_keyboard_grab_gets_the_keymap_of_the_keys_it_is_sent.This change has been running daily in the author's own session (a Windows-7-like desktop on ShojiWM).