diff --git a/upptst/WindowPosWayland/WindowPosWayland.upp b/upptst/WindowPosWayland/WindowPosWayland.upp index 5c4f53e15..968b03526 100644 --- a/upptst/WindowPosWayland/WindowPosWayland.upp +++ b/upptst/WindowPosWayland/WindowPosWayland.upp @@ -5,5 +5,5 @@ file main.cpp; mainconfig - "" = "GUI"; + "" = "GUI WAYLAND"; diff --git a/upptst/WindowPosWayland/main.cpp b/upptst/WindowPosWayland/main.cpp index 17e20d82b..0fafcfd43 100644 --- a/upptst/WindowPosWayland/main.cpp +++ b/upptst/WindowPosWayland/main.cpp @@ -8,7 +8,7 @@ INITBLOCK { struct MyApp : TopWindow { TimeCallback tm; - virtual void Paint(Draw& w) { + void Paint(Draw& w) override { Size sz = GetSize(); w.DrawRect(GetSize(), SWhite()); int y = 0; @@ -24,13 +24,24 @@ struct MyApp : TopWindow { DrawSmartText(w, 0, 0, sz.cx, txt); } + void LeftDown(Point p, dword keyflags) override + { + new MyApp; + } + + void Close() override { + delete this; + } + MyApp() { Sizeable().Zoomable(); tm.Set(-200, [=] { Refresh(); }); + OpenMain(); } }; GUI_APP_MAIN { - MyApp().Run(); + new MyApp; + Ctrl::EventLoop(); }