diff options
| author | Adam Malczewski <[email protected]> | 2026-06-15 14:17:19 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-15 14:17:19 +0900 |
| commit | f0f372ef6ca9cf77ca774583192e83a4cde88d32 (patch) | |
| tree | 871a330407a0f0fca0f32b50edcdea805fece79a /packages/kernel/src/server.cpp | |
| parent | ed1e3d60fe209af06911c640a145936f71adc238 (diff) | |
| download | unbox-f0f372ef6ca9cf77ca774583192e83a4cde88d32.tar.gz unbox-f0f372ef6ca9cf77ca774583192e83a4cde88d32.zip | |
rml-compositing W3: click/tap-to-focus (kernel on_pressed + window-field)
Completes the window-manager input story.
kernel (additive): SurfaceElement::on_pressed(std::function<void()>) — the
substrate invokes it (error-isolated to the owner) when a pointer button PRESS
or touch DOWN is routed to that surface element (root or any subsurface/popup
child fires the root element's handler), in addition to the existing client
input-back forwarding. Not fired on motion/release/miss. It is the
click/tap-to-focus SIGNAL; focus policy stays the wm's.
ext-window-field: on map, sets the element's on_pressed -> that toplevel's
Toplevel::focus() (keyboard focus + on_toplevel_focused -> RCSS raise/highlight),
guarded on the window still being tracked. So a click/tap on a background window
now focuses it (the gap noted in Wave 3).
kernel + ext-window-field + ext-xdg-shell suites green; build-asan green, no new
unbox::-framed leak/UB (the stored handler dies with the element).
Diffstat (limited to 'packages/kernel/src/server.cpp')
| -rw-r--r-- | packages/kernel/src/server.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/kernel/src/server.cpp b/packages/kernel/src/server.cpp index f88fa8f..d4f47c8 100644 --- a/packages/kernel/src/server.cpp +++ b/packages/kernel/src/server.cpp @@ -107,7 +107,8 @@ auto Server::ui_create_surface_element_for_test() -> bool { return false; } impl_->test_surface_element = - impl_->substrate->create_surface_element(impl_->test_last_client_surface); + impl_->substrate->create_surface_element(kernel_extension_id, + impl_->test_last_client_surface); return impl_->test_surface_element != nullptr; } @@ -261,7 +262,7 @@ auto PerExtensionUi::create_surface_element(wlr_surface* client) if (server_->substrate == nullptr) { return nullptr; } - return server_->substrate->create_surface_element(client); + return server_->substrate->create_surface_element(id_, client); } auto PerExtensionUi::available() const -> bool { |
