aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp8
-rw-r--r--src/plugins/Manganelo.cpp2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 755b5b2..cd4a279 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -2782,6 +2782,8 @@ namespace QuickMedia {
malloc_trim(0);
+ sf::Clock force_redraw_timer;
+
// TODO: Show to user if a certain page is missing (by checking page name (number) and checking if some are skipped)
while (current_page == PageType::IMAGES && window.isOpen()) {
while(window.pollEvent(event)) {
@@ -2848,6 +2850,12 @@ namespace QuickMedia {
content_size.x = window_size.x;
content_size.y = window_size.y - bottom_panel_height;
+ // TODO: Track x11 window damage instead
+ if(force_redraw_timer.getElapsedTime().asSeconds() >= 1.0f) {
+ force_redraw_timer.restart();
+ redraw = true;
+ }
+
if(redraw) {
redraw = false;
if(error) {
diff --git a/src/plugins/Manganelo.cpp b/src/plugins/Manganelo.cpp
index 960caaf..5e53451 100644
--- a/src/plugins/Manganelo.cpp
+++ b/src/plugins/Manganelo.cpp
@@ -163,7 +163,7 @@ namespace QuickMedia {
}
manga_id = url.substr(index + 6);
- if(manga_id.size() <= 2) {
+ if(manga_id.empty()) {
std::string err_msg = "Url ";
err_msg += url;
err_msg += " doesn't contain manga id";