diff --git a/AUR/PKGBUILD b/AUR/PKGBUILD index b7773fb..b66f6d4 100644 --- a/AUR/PKGBUILD +++ b/AUR/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Daniel Dada pkgname=clrsync -pkgver=1.0.2 +pkgver=1.0.4 pkgrel=1 pkgdesc="Color scheme manager" arch=('x86_64') diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a9a210..d019c08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.25) -project(clrsync VERSION 1.0.2 LANGUAGES CXX) +project(clrsync VERSION 1.0.4 LANGUAGES CXX) include(GNUInstallDirs) diff --git a/VERSION b/VERSION index 6d7de6e..ee90284 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.2 +1.0.4 diff --git a/src/core/common/version.hpp b/src/core/common/version.hpp index 44c4104..735613c 100644 --- a/src/core/common/version.hpp +++ b/src/core/common/version.hpp @@ -6,7 +6,7 @@ namespace clrsync::core { -const std::string GIT_SEMVER = "1.0.2+git.g41939f4"; +const std::string GIT_SEMVER = "1.0.3+git.gd852d58"; const std::string version_string(); } // namespace clrsync::core diff --git a/src/gui/platform/linux/file_browser_linux.cpp b/src/gui/platform/linux/file_browser_linux.cpp index 1249bfe..4e7b494 100644 --- a/src/gui/platform/linux/file_browser_linux.cpp +++ b/src/gui/platform/linux/file_browser_linux.cpp @@ -3,6 +3,7 @@ #include "gui/platform/file_browser.hpp" #include #include +#include namespace file_dialogs { @@ -38,7 +39,16 @@ std::string open_file_dialog(const std::string &title, const std::string &initia } std::string result; - if (gtk_native_dialog_run(GTK_NATIVE_DIALOG(native)) == GTK_RESPONSE_ACCEPT) + + gint response = gtk_native_dialog_run(GTK_NATIVE_DIALOG(native)); + + while (gtk_events_pending()) + { + gtk_main_iteration(); + glfwPollEvents(); + } + + if (response == GTK_RESPONSE_ACCEPT) { char *filename = gtk_file_chooser_get_filename(chooser); if (filename) @@ -79,7 +89,16 @@ std::string save_file_dialog(const std::string &title, const std::string &initia } std::string result; - if (gtk_native_dialog_run(GTK_NATIVE_DIALOG(native)) == GTK_RESPONSE_ACCEPT) + + gint response = gtk_native_dialog_run(GTK_NATIVE_DIALOG(native)); + + while (gtk_events_pending()) + { + gtk_main_iteration(); + glfwPollEvents(); + } + + if (response == GTK_RESPONSE_ACCEPT) { char *filename = gtk_file_chooser_get_filename(chooser); if (filename) @@ -113,7 +132,16 @@ std::string select_folder_dialog(const std::string &title, const std::string &in } std::string result; - if (gtk_native_dialog_run(GTK_NATIVE_DIALOG(native)) == GTK_RESPONSE_ACCEPT) + + gint response = gtk_native_dialog_run(GTK_NATIVE_DIALOG(native)); + + while (gtk_events_pending()) + { + gtk_main_iteration(); + glfwPollEvents(); + } + + if (response == GTK_RESPONSE_ACCEPT) { char *filename = gtk_file_chooser_get_filename(chooser); if (filename) diff --git a/src/gui/platform/linux/font_loader_linux.cpp b/src/gui/platform/linux/font_loader_linux.cpp index e55cc13..7a7983a 100644 --- a/src/gui/platform/linux/font_loader_linux.cpp +++ b/src/gui/platform/linux/font_loader_linux.cpp @@ -6,9 +6,12 @@ #include #include #include +#include std::string font_loader::find_font_linux(const char *font_name) { + glfwPollEvents(); + FcInit(); FcPattern *pattern = FcNameParse(reinterpret_cast(font_name)); @@ -65,6 +68,8 @@ std::vector font_loader::get_system_fonts() { std::vector fonts; + glfwPollEvents(); + FcInit(); FcPattern *pattern = FcPatternCreate(); FcObjectSet *os = FcObjectSetBuild(FC_FAMILY, nullptr); @@ -74,6 +79,12 @@ std::vector font_loader::get_system_fonts() { for (int i = 0; i < fs->nfont; i++) { + // TODO: should change this to something sane + if (i % 100 == 0) + { + glfwPollEvents(); + } + FcChar8 *family = nullptr; if (FcPatternGetString(fs->fonts[i], FC_FAMILY, 0, &family) == FcResultMatch) {