diff options
-rw-r--r-- | project.conf | 6 | ||||
-rw-r--r-- | src/Text.cpp | 1 | ||||
-rw-r--r-- | src/main.cpp | 13 |
3 files changed, 11 insertions, 9 deletions
diff --git a/project.conf b/project.conf index cf60d63..09891f7 100644 --- a/project.conf +++ b/project.conf @@ -5,9 +5,9 @@ type = "executable" platforms = ["linux32", "linux64"] [dependencies] -sfml-window = "2.4.2" -sfml-graphics = "2.4.2" -sfml-system = "2.4.2" +sfml-window = "2.5" +sfml-graphics = "2.5" +sfml-system = "2.5" boost-filesystem = "1.66.0" tiny-process = "2.0.0" mpv = "1.25.0" diff --git a/src/Text.cpp b/src/Text.cpp index 3aa1574..2292a4e 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -22,6 +22,7 @@ namespace dchat Text::Text(const sf::Font *_font) : font(_font), characterSize(0), + vertices(sf::PrimitiveType::Quads), maxWidth(0.0f), color(sf::Color::White), urlColor(URL_COLOR), diff --git a/src/main.cpp b/src/main.cpp index a66945c..4440315 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -659,11 +659,11 @@ int main(int argc, char **argv) Channel::getCurrent()->addLocalMessage(msg, Channel::getCurrent()->getSystemUser()); }); - sf::Event event; while (window.isOpen()) { Channel *currentChannel = Channel::getCurrent(); + sf::Event event; while (window.pollEvent(event)) { if (event.type == sf::Event::Closed) @@ -695,11 +695,12 @@ int main(int argc, char **argv) if(focused) { ImagePreview::processEvent(event); - if(!ImagePreview::getPreviewContentPtr() && ImagePreview::getTimeSinceLastSeenMs() > 250) - { - GlobalContextMenu::processEvent(event); - currentChannel->processEvent(event, cache); - } + } + + if(!ImagePreview::getPreviewContentPtr() && ImagePreview::getTimeSinceLastSeenMs() > 250) + { + GlobalContextMenu::processEvent(event); + currentChannel->processEvent(event, cache); } } |