Skip to content

Commit

Permalink
wayland: post to ui thread
Browse files Browse the repository at this point in the history
  • Loading branch information
igagis committed Mar 29, 2024
1 parent 48a17b2 commit d99e994
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/ruisapp/glue/linux/glue_wayland.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -842,17 +842,16 @@ application::application(std::string name, const window_params& wp) :
# error "Unknown graphics API"
#endif
utki::make_shared<ruis::updater>(),
[](std::function<void()> proc) {
// TODO:
// get_impl(get_window_pimpl(*this)).ui_queue.push_back(std::move(a));
[this](std::function<void()> proc) {
get_impl(*this).ui_queue.push_back(std::move(proc));
},
[](ruis::mouse_cursor c) {
// TODO:
// auto& ww = get_impl(*this);
// ww.set_cursor(c);
},
get_impl(window_pimpl).get_dots_per_inch(),
get_impl(window_pimpl).get_dots_per_pp()
get_impl(this->window_pimpl).get_dots_per_inch(),
get_impl(this->window_pimpl).get_dots_per_pp()
)),
storage_dir(initialize_storage_dir(this->name))
{
Expand Down Expand Up @@ -965,9 +964,7 @@ int main(int argc, const char** argv)

if (ui_queue_ready_to_read) {
while (auto m = ww.ui_queue.pop_front()) {
// LOG([](auto& o) {
// o << "loop proc" << std::endl;
// })
std::cout << "loop proc" << std::endl;
m();
}
}
Expand Down

0 comments on commit d99e994

Please sign in to comment.