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
This commit is contained in:
Bastien Nocera 2025-02-04 17:20:46 +01:00 committed by Lane.Wei
parent cd8a9786a8
commit 4b48ad9743
1 changed files with 2 additions and 0 deletions

View File

@ -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)