@@ -22,7 +22,6 @@ SOutput::SOutput(SP<CCWlOutput> output_) : output(output_) {
2222 refreshRate = refresh;
2323 width = width_;
2424 height = height_;
25- Debug::log (LOG, " ??? {} {}" , flags, refresh);
2625 });
2726 output->setGeometry (
2827 [this ](CCWlOutput* r, int32_t x_, int32_t y_, int32_t physical_width, int32_t physical_height, int32_t subpixel, const char * make, const char * model, int32_t transform_) {
@@ -31,7 +30,10 @@ SOutput::SOutput(SP<CCWlOutput> output_) : output(output_) {
3130 y = y_;
3231 });
3332 output->setScale ([this ](CCWlOutput* r, uint32_t factor_) { scale = factor_; });
34- output->setDone ([](CCWlOutput* r) {});
33+ output->setDone ([](CCWlOutput* r) {
34+ if (g_pPortalManager->m_sPortals .inputCapture != nullptr )
35+ g_pPortalManager->m_sPortals .inputCapture ->zonesChanged ();
36+ });
3537}
3638
3739CPortalManager::CPortalManager () {
@@ -86,7 +88,6 @@ void CPortalManager::onGlobal(uint32_t name, const char* interface, uint32_t ver
8688 m_sPortals.remoteDesktop ->registerKeyboard (makeShared<CCZwpVirtualKeyboardManagerV1>(
8789 (wl_proxy*)wl_registry_bind ((wl_registry*)m_sWaylandConnection.registry ->resource (), name, &zwp_virtual_keyboard_manager_v1_interface, version)));
8890
89-
9091 else if (INTERFACE == hyprland_toplevel_export_manager_v1_interface.name ) {
9192 m_sWaylandConnection.hyprlandToplevelMgr = makeShared<CCHyprlandToplevelExportManagerV1>(
9293 (wl_proxy*)wl_registry_bind ((wl_registry*)m_sWaylandConnection.registry ->resource (), name, &hyprland_toplevel_export_manager_v1_interface, version));
@@ -229,6 +230,11 @@ void CPortalManager::onGlobal(uint32_t name, const char* interface, uint32_t ver
229230 if (!std::any_cast<Hyprlang::INT>(m_sConfig.config ->getConfigValue (" general:toplevel_dynamic_bind" )))
230231 m_sHelpers.toplevel ->activate ();
231232 }
233+
234+ else if (INTERFACE == hyprland_toplevel_mapping_manager_v1_interface.name ) {
235+ m_sHelpers.toplevelMapping = std::make_unique<CToplevelMappingManager>(makeShared<CCHyprlandToplevelMappingManagerV1>(
236+ (wl_proxy*)wl_registry_bind ((wl_registry*)m_sWaylandConnection.registry ->resource (), name, &hyprland_toplevel_mapping_manager_v1_interface, version)));
237+ }
232238}
233239
234240void CPortalManager::onGlobalRemoved (uint32_t name) {
@@ -451,6 +457,7 @@ void CPortalManager::startEventLoop() {
451457 m_sPortals.inputCapture .reset ();
452458 m_sPortals.remoteDesktop .reset ();
453459 m_sHelpers.toplevel .reset ();
460+ m_sPortals.inputCapture .reset ();
454461
455462 m_pConnection.reset ();
456463 pw_loop_destroy (m_sPipewire.loop );
0 commit comments