2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Loading libunity only in Unity and Pantheon. #3053

Commit 296c800b39 introduced a regression which caused crashes
in some ArchLinux distros when attempting to load or use libunity.
This commit is contained in:
John Preston
2017-02-26 20:19:35 +03:00
parent 5195b4d3ef
commit dcd6028e91
5 changed files with 204 additions and 8 deletions

View File

@@ -23,6 +23,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "platform/linux/linux_gdk_helper.h"
#include "platform/linux/linux_libnotify.h"
#include "platform/linux/linux_desktop_environment.h"
namespace Platform {
namespace Libs {
@@ -271,12 +272,14 @@ void start() {
}
#ifndef TDESKTOP_DISABLE_UNITY_INTEGRATION
QLibrary lib_unity(qstr("unity"), 9, 0);
loadLibrary(lib_unity, "unity", 9);
if (DesktopEnvironment::TryUnityCounter()) {
QLibrary lib_unity(qstr("unity"), 9, 0);
loadLibrary(lib_unity, "unity", 9);
load(lib_unity, "unity_launcher_entry_get_for_desktop_id", unity_launcher_entry_get_for_desktop_id);
load(lib_unity, "unity_launcher_entry_set_count", unity_launcher_entry_set_count);
load(lib_unity, "unity_launcher_entry_set_count_visible", unity_launcher_entry_set_count_visible);
load(lib_unity, "unity_launcher_entry_get_for_desktop_id", unity_launcher_entry_get_for_desktop_id);
load(lib_unity, "unity_launcher_entry_set_count", unity_launcher_entry_set_count);
load(lib_unity, "unity_launcher_entry_set_count_visible", unity_launcher_entry_set_count_visible);
}
#endif // !TDESKTOP_DISABLE_UNITY_INTEGRATION
if (gtkLoaded) {