diff options
| author | Calvin Morrison <calvin@pobox.com> | 2026-05-22 10:16:15 -0400 |
|---|---|---|
| committer | Calvin Morrison <calvin@pobox.com> | 2026-05-22 10:16:15 -0400 |
| commit | cdf72828e599a63fca4a0f1ceeb3145fba581aa3 (patch) | |
| tree | 16ee02f0ce1e317a09fd4c2a3f9fbdc04aadfe60 /src/main.cpp | |
| parent | b30b234afa3ec18156e432b9f2a7ad2ca80cc672 (diff) | |
| parent | d9876849f0208291cc7010522e85593703ff52bd (diff) | |
Merge branch 'and-the-oss-you-rode-in-on'
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/src/main.cpp b/src/main.cpp index e8e7d36..02da9e1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,12 +2,9 @@ #include <tdecmdlineargs.h> #include <tdeaboutdata.h> #include <tdelocale.h> -#include <tdeconfig.h> -#include <tdeglobal.h> -#include "model/pulsemodel.h" -#include "ui/mixerwindow.h" #include "ui/tmixapp.h" +#include "ui/backendcontroller.h" static TDECmdLineOptions options[] = { TDECmdLineLastOption }; @@ -31,19 +28,12 @@ int main( int argc, char **argv ) TmixApp app; app.disableSessionManagement(); - PulseModel *model = new PulseModel; - if ( !model->open() ) { - delete model; - return 1; - } + // No parent — we delete ctrl explicitly before app exits so that + // TmixTray's X11 teardown happens while the display is still open. + BackendController *ctrl = new BackendController; + ctrl->start(); - MixerWindow *win = new MixerWindow( model ); - app.setMainWindow( win ); - - TDEConfig *cfg = TDEGlobal::config(); - cfg->setGroup("General"); - if ( !cfg->readBoolEntry("DockInTray", true) ) - win->show(); - - return app.exec(); + int ret = app.exec(); + delete ctrl; + return ret; } |
