Files
OrcaSlicer/src/slic3r/GUI
d4not 69e16cd7ef fix: prevent CPU-spin in Sidebar leave handler on inactive Wayland workspace (#13897)
When the OrcaSlicer window is on an inactive Hyprland (or any Wayland
compositor that keeps surfaces mapped while hidden) workspace, GTK
keeps delivering synthetic leave-notify events to the printer-preset
row. The wxEVT_LEAVE_WINDOW handler at Plater.cpp:1855 calls
wxFindWindowAtPoint(), which walks the entire wxWidgets window tree
calling IsShown() / gtk_widget_get_child_visible() on each widget,
then Hide()s the edit button and triggers a Layout() of the parent
panel. The Hide()+Layout() re-fires more leave events, creating a
feedback loop that pegs a CPU core at 100% indefinitely.

GDB attached to a frozen process confirmed the main thread stuck in:

  wxFindWindowAtPoint (recursing through widget tree)
    -> wxWindow::IsShown
      -> gtk_widget_get_child_visible
  ...
  Sidebar::Sidebar(Plater*)::$_14   <- the leave handler lambda
  wxEvtHandler::SafelyProcessEvent
  wxGTKImpl::WindowLeaveCallback
  gtk_main_do_event
  ...

IsShownOnScreen() can't be used as a guard here because GTK on Wayland
reports widgets as visible even when the toplevel surface is on an
inactive workspace (see existing comment at Plater.cpp:9304).

Fix: state-based short-circuit. If btn_edit_printer is already hidden,
the handler has no transition to perform - skip the expensive tree walk
and the Hide()+Layout() that would re-trigger the feedback loop. After
the first leave event, every subsequent leave event is O(1).

Refs:
- #12387 (open issue with matching setup: Arch + Hyprland + RTX 3060 + Bambu A1)
- #11196 (introduced the hover-edit-button feature in Nov 2025)
2026-05-28 14:20:41 +08:00
..
2026-03-09 20:52:12 +08:00
2026-05-18 12:58:58 +08:00
2026-04-28 16:57:02 +08:00
2025-10-28 15:29:50 +08:00
2025-10-05 16:02:17 +08:00
2026-04-20 19:27:38 -03:00
2026-01-03 23:06:57 +08:00
2025-07-06 11:34:47 +08:00
2026-02-04 11:40:02 +00:00
2023-12-01 10:42:45 +00:00
2026-05-11 19:38:40 +08:00
2026-05-18 12:58:58 +08:00
2026-05-18 12:58:58 +08:00
2025-08-22 20:02:26 +08:00
2023-12-01 10:42:45 +00:00
2025-09-21 13:47:51 +08:00
2025-10-02 09:30:48 +08:00
2025-10-02 09:30:48 +08:00
2026-05-18 12:58:58 +08:00
2025-10-02 09:30:48 +08:00
2025-10-28 15:29:56 +08:00
2025-10-28 15:29:56 +08:00
2026-05-16 01:12:30 +08:00
2026-05-16 01:12:30 +08:00
2025-09-21 23:01:08 +08:00
2026-01-23 17:05:56 +08:00
2026-04-25 18:14:51 +08:00
2026-04-25 18:14:51 +08:00
2026-03-11 17:20:12 -07:00
2026-04-25 18:14:51 +08:00
2026-05-10 02:21:13 +08:00
2026-01-23 17:05:56 +08:00
2026-03-09 20:36:36 +08:00
2024-07-23 18:00:21 +08:00
2026-01-03 23:06:57 +08:00
2026-01-23 17:05:56 +08:00
2026-01-03 23:06:57 +08:00
2026-05-25 13:28:35 -03:00
2026-02-04 11:40:02 +00:00
2026-01-23 17:05:56 +08:00
2026-01-23 17:05:56 +08:00
2025-10-28 15:30:06 +08:00
2025-11-19 13:51:52 +03:00
2025-10-28 15:29:56 +08:00
2026-04-25 18:14:51 +08:00
2026-04-25 18:14:51 +08:00