{"record":{"id":"cae42effa3e768ca","repo":"slint-ui/slint","slug":"unable-to-show-popup-window","errorCode":null,"errorMessage":"unable to show popup window","messagePattern":"unable to show popup window","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/core/window.rs","lineNumber":2161,"sourceCode":"                    &clip_region,\n                );\n                self.window_adapter().request_redraw();\n                (\n                    PopupWindowLocation::ChildWindow(rect.origin),\n                    Box::pin(PropertyTracker::new_with_dirty_handler(\n                        PopupWindowPropertiesTracker {\n                            parent_window_adapter_weak: parent_window_adapter_weak.clone(),\n                            popup_id,\n                        },\n                    )),\n                )\n            } else {\n                let popup_window = popup_window_adapter.window();\n                WindowInner::from_pub(popup_window).set_component(popup_componentrc);\n                popup_window.set_position(LogicalPosition::from_euclid(position));\n                popup_window.set_size(WindowSize::Logical(LogicalSize::from_euclid(size)));\n\n                popup_window_adapter.set_visible(true).expect(\"unable to show popup window\");\n                (\n                    PopupWindowLocation::TopLevel(popup_window_adapter),\n                    Box::pin(PropertyTracker::new_with_dirty_handler(\n                        PopupWindowPropertiesTracker {\n                            parent_window_adapter_weak: parent_window_adapter_weak.clone(),\n                            popup_id,\n                        },\n                    )),\n                )\n            };\n\n        let focus_item = if matches!(window_kind, WindowKind::ToolTip) {\n            Default::default()\n        } else {\n            self.take_focus_item(&FocusEvent::FocusOut(FocusReason::PopupActivation))\n                .map(|item| item.downgrade())\n                .unwrap_or_default()\n        };","sourceCodeStart":2143,"sourceCodeEnd":2179,"githubUrl":"https://github.com/slint-ui/slint/blob/3a7e700487dc74d404cad0726378053ab763d4e0/internal/core/window.rs#L2143-L2179","documentation":"Slint panics when the window adapter refuses to make a popup window visible during `show_popup`. Popup windows are created internally when a component declares `show_popup`; the backend's `set_visible(true)` returned an Err, meaning the platform window could not be mapped/shown. This indicates a backend or platform-level failure, not a Slint API misuse.","triggerScenarios":"Calling `show_popup` (or triggering it via a property/touch event) when the backend window adapter's `set_visible` fails — e.g. the underlying platform window was already destroyed, the display/connection is gone, or the backend does not support separate top-level popup windows.","commonSituations":"Running on embedded/backends without real multi-window support; showing a popup after the parent window was closed; Wayland/X11 connection lost; Android activity in background state.","solutions":["Verify the parent window is still visible and mapped before calling show_popup","Check the backend/platform supports top-level popups (winit backend with multi-window support) rather than a limited embedded backend","Update to a newer Slint version; popup handling across backends has changed over releases","Reproduce with the `testing` backend to see if it is backend-specific"],"exampleFix":"// before: showing a popup after window closed\nwindow.show_popup(popup, position);\n\n// after: guard on visibility/valid window\nif window.is_visible() {\n    window.show_popup(popup, position);\n}","handlingStrategy":"validation","validationCode":"if !window.is_visible() { return; } // do not show popups on hidden windows\n// plus: only call show_popup on backends with window support\n","typeGuard":"fn can_show_popup(w: &slint::Window) -> bool { w.is_visible() }","tryCatchPattern":null,"preventionTips":["Never call show_popup after closing the parent window","Test popup flows on your target backend (embedded backends may not support top-level popups)","Pin to a Slint release where popup behavior on your platform is known-good"],"tags":["gui","popup","window","backend","panic"],"backgroundTag":"internal-invariant-violation","analyzedSha":"3a7e700487dc74d404cad0726378053ab763d4e0","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}