Check for all needed gtk functions for gtk clipboard

This commit is contained in:
Ilya Fedin
2020-06-27 05:02:18 +04:00
committed by John Preston
parent d319c85c57
commit 806f2e0b50
4 changed files with 24 additions and 7 deletions

View File

@@ -414,7 +414,7 @@ void ForceDisabled(QAction *action, bool disabled) {
MainWindow::MainWindow(not_null<Window::Controller*> controller)
: Window::MainWindow(controller) {
#ifndef TDESKTOP_DISABLE_GTK_INTEGRATION
if (Libs::gtk_clipboard_get != nullptr) {
if (GtkClipboardSupported()) {
_gtkClipboard = Libs::gtk_clipboard_get(Libs::gdk_atom_intern("CLIPBOARD", true));
}
#endif // !TDESKTOP_DISABLE_GTK_INTEGRATION