summaryrefslogtreecommitdiffstats
path: root/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp
diff options
context:
space:
mode:
authorIlya Fedin <fedin-ilja2010@ya.ru>2021-06-26 22:38:22 +0400
committerJohn Preston <johnprestonmail@gmail.com>2021-07-01 22:13:50 +0300
commit47e32bebe4f315e8d11706cebe1d8d3cd665907d (patch)
treedd5054673051fcdc16cbfe32c2a6d0d5286ab542 /Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp
parent0b21c04489e1af39b6da8a525921e26d0ab7c7e5 (diff)
Remove not really needed gtk scale factor query
Diffstat (limited to 'Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp')
-rw-r--r--Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp b/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp
index 258a779e54..13cbe3f31c 100644
--- a/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp
+++ b/Telegram/SourceFiles/platform/linux/linux_gtk_integration.cpp
@@ -71,11 +71,6 @@ void GtkIntegration::load() {
LOAD_GTK_SYMBOL(lib, gdk_atom_intern);
- LOAD_GTK_SYMBOL(lib, gdk_display_get_default);
- LOAD_GTK_SYMBOL(lib, gdk_display_get_monitor);
- LOAD_GTK_SYMBOL(lib, gdk_display_get_primary_monitor);
- LOAD_GTK_SYMBOL(lib, gdk_monitor_get_scale_factor);
-
LOAD_GTK_SYMBOL(lib, gdk_pixbuf_get_has_alpha);
LOAD_GTK_SYMBOL(lib, gdk_pixbuf_get_pixels);
LOAD_GTK_SYMBOL(lib, gdk_pixbuf_get_width);
@@ -91,33 +86,6 @@ void GtkIntegration::load() {
Loaded = true;
}
-std::optional<int> GtkIntegration::scaleFactor() const {
- if ((gdk_display_get_default == nullptr)
- || (gdk_display_get_monitor == nullptr)
- || (gdk_display_get_primary_monitor == nullptr)
- || (gdk_monitor_get_scale_factor == nullptr)) {
- return std::nullopt;
- }
-
- const auto display = gdk_display_get_default();
- if (!display) {
- return std::nullopt;
- }
-
- const auto monitor = [&] {
- if (const auto primary = gdk_display_get_primary_monitor(display)) {
- return primary;
- }
- return gdk_display_get_monitor(display, 0);
- }();
-
- if (!monitor) {
- return std::nullopt;
- }
-
- return gdk_monitor_get_scale_factor(monitor);
-}
-
bool GtkIntegration::showOpenWithDialog(const QString &filepath) const {
return File::internal::ShowGtkOpenWithDialog(filepath);
}