mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-24 19:32:18 +00:00
Linux: use GTK sink for Wayland Bambu liveview (#13432)
* Use GTK sink for Wayland liveview Keep native Wayland sessions on the GTK backend and use a GTK widget based GStreamer sink for Bambu liveview instead of the Wayland video overlay path, which can render black on NVIDIA/Hyprland. Keep the existing wxMediaCtrl path for X11 and continue preferring software H.264 decoding while demoting GL and hardware decoder paths that caused liveview crashes. * Narrow Linux liveview fix to native Wayland * Tighten native Wayland liveview setup * Tighten Wayland liveview teardown and rank setup * Package GStreamer gtksink for Wayland liveview --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
@@ -32,7 +32,8 @@ static std::map<int, std::string> error_messages = {
|
||||
{100, L("The player is not loaded, please click \"play\" button to retry.")},
|
||||
{101, L("The player is not loaded, please click \"play\" button to retry.")},
|
||||
{102, L("The player is not loaded, please click \"play\" button to retry.")},
|
||||
{103, L("The player is not loaded, please click \"play\" button to retry.")}
|
||||
{103, L("The player is not loaded, please click \"play\" button to retry.")},
|
||||
{104, L("The player is not loaded because the GStreamer GTK video sink is missing or failed to initialize.")}
|
||||
};
|
||||
|
||||
namespace Slic3r {
|
||||
@@ -838,6 +839,12 @@ void wxMediaCtrl2::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
wxWindow::DoSetSize(x, y, width, height, sizeFlags);
|
||||
#else
|
||||
wxMediaCtrl::DoSetSize(x, y, width, height, sizeFlags);
|
||||
#endif
|
||||
#if defined(__LINUX__) && defined(__WXGTK__)
|
||||
if (m_gtk_video_window) {
|
||||
const wxSize client_size = GetClientSize();
|
||||
m_gtk_video_window->SetSize(0, 0, client_size.GetWidth(), client_size.GetHeight());
|
||||
}
|
||||
#endif
|
||||
if (sizeFlags & wxSIZE_USE_EXISTING) return;
|
||||
wxSize size = m_video_size;
|
||||
@@ -853,4 +860,3 @@ void wxMediaCtrl2::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user