Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two Linux Fixes #5

Merged
merged 3 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/widgets/lineedit/lineedit.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#include <algorithm>
#include "widgets/lineedit/lineedit.h"
#include "core/utf8reader.h"
#include "core/colorf.h"
Expand Down
7 changes: 3 additions & 4 deletions src/window/sdl2/sdl2displaywindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,10 @@ void SDL2DisplayWindow::RunLoop()

while (!ExitRunLoop)
{
SDL_Event event;
SDL_Event event = {};
int result = SDL_WaitEvent(&event);
if (result == 0)
throw std::runtime_error(std::string("SDL_WaitEvent failed:") + SDL_GetError());
DispatchEvent(event);
if (result == 1)
DispatchEvent(event); // Silently ignore if it fails and pray it doesn't busy loop, because SDL and Linux utterly sucks!
}
}

Expand Down
Loading