Skip to content

Commit

Permalink
CatDog: Make it always on top
Browse files Browse the repository at this point in the history
  • Loading branch information
demostanis authored and AtkinsSJ committed Oct 13, 2022
1 parent 63a18aa commit 1eac02c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Userland/Demos/CatDog/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(context_menu->try_add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })));

window->show();
window->set_always_on_top();
catdog_widget->start_timer(250, Core::TimerShouldFireWhenNotVisible::Yes);
catdog_widget->start_the_timer(); // timer for "mouse sleep detection"

Expand All @@ -74,6 +75,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
catdog_widget->set_roaming(false);
advice_window->move_to(window->x() - advice_window->width() / 2, window->y() - advice_window->height());
advice_window->show();
advice_window->set_always_on_top();
};
advice_timer->start();

Expand Down

0 comments on commit 1eac02c

Please sign in to comment.