mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Use Platform::IsWayland from lib_base
This commit is contained in:
@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#include "platform/linux/linux_libs.h"
|
||||
|
||||
#include "base/platform/base_platform_info.h"
|
||||
#include "platform/linux/linux_gdk_helper.h"
|
||||
#include "platform/linux/linux_desktop_environment.h"
|
||||
#include "platform/linux/specific_linux.h"
|
||||
@@ -15,8 +16,6 @@ extern "C" {
|
||||
#include <X11/Xlib.h>
|
||||
}
|
||||
|
||||
#include <QtGui/QGuiApplication>
|
||||
|
||||
namespace Platform {
|
||||
namespace Libs {
|
||||
namespace {
|
||||
@@ -144,8 +143,7 @@ bool setupGtkBase(QLibrary &lib_gtk) {
|
||||
// Otherwise we get segfault in Ubuntu 17.04 in gtk_init_check() call.
|
||||
// See https://github.com/telegramdesktop/tdesktop/issues/3176
|
||||
// See https://github.com/telegramdesktop/tdesktop/issues/3162
|
||||
if(QGuiApplication::platformName().startsWith(qsl("wayland"), Qt::CaseInsensitive)
|
||||
&& !lib_gtk.fileName().contains("gtk-x11-2.0")) {
|
||||
if(Platform::IsWayland() && !lib_gtk.fileName().contains("gtk-x11-2.0")) {
|
||||
DEBUG_LOG(("Limit allowed GDK backends to wayland"));
|
||||
gdk_set_allowed_backends("wayland");
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user