CtrlCore: Now calling XInitThreads always before gtk_init_check

This commit is contained in:
Mirek Fidler 2025-02-26 15:45:19 +01:00
parent 99ea736e9a
commit ee13d043b7

View file

@ -100,6 +100,10 @@ void Ctrl::UseWayland()
bool InitGtkApp(int argc, char **argv, const char **envptr)
{
LLOG(rmsecs() << " InitGtkApp");
XInitThreads(); // otherwise there are errors despite GuiLock
// this has to be called before gtk_init_check, otherwise it crashes with xfce (at least
// some versions)
#if GTK_CHECK_VERSION(3, 10, 0)
String backends = "x11,wayland";
@ -115,8 +119,6 @@ bool InitGtkApp(int argc, char **argv, const char **envptr)
Cerr() << t_("Failed to initialized GTK app!") << "\n";
return false;
}
if(Ctrl::IsX11())
XInitThreads(); // otherwise there are errors despite GuiLock
EnterGuiMutex();