summaryrefslogtreecommitdiff
path: root/MenuApplets/Clock/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'MenuApplets/Clock/main.cpp')
-rw-r--r--MenuApplets/Clock/main.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/MenuApplets/Clock/main.cpp b/MenuApplets/Clock/main.cpp
index e27f11215e..4ef3e65ec0 100644
--- a/MenuApplets/Clock/main.cpp
+++ b/MenuApplets/Clock/main.cpp
@@ -106,10 +106,8 @@ int main(int argc, char** argv)
window->set_title("Clock");
window->set_window_type(GUI::WindowType::MenuApplet);
- auto widget = ClockWidget::construct();
-
- window->resize(widget->get_width(), 16);
- window->set_main_widget(widget);
+ auto& widget = window->set_main_widget<ClockWidget>();
+ window->resize(widget.get_width(), 16);
window->show();
if (unveil("/res", "r") < 0) {