From 4b48ad974389c3c20dfd605e9ddba0324787d27f Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 4 Feb 2025 17:20:46 +0100 Subject: [PATCH] FIX: Fix focus stealing from printer disconnection Every time one of the connected printers disconnects, the the old code would try to set the keyboard focus to the "Device" tab, leading to a number of, either, focus stealing events, or notifications if the desktop has focus stealing prevention (like GNOME). Disable the focus setting on Linux to prevent that focus stealing. See https://github.com/bambulab/BambuStudio/pull/5891#issuecomment-2635143655 --- src/slic3r/GUI/StatusPanel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/slic3r/GUI/StatusPanel.cpp b/src/slic3r/GUI/StatusPanel.cpp index 484b10120..0848978c9 100644 --- a/src/slic3r/GUI/StatusPanel.cpp +++ b/src/slic3r/GUI/StatusPanel.cpp @@ -4255,7 +4255,9 @@ void StatusPanel::set_default() m_ams_control_box->Hide(); m_ams_control->Reset(); error_info_reset(); +#ifndef __WXGTK__ SetFocus(); +#endif } void StatusPanel::show_status(int status)