summaryrefslogtreecommitdiffstats
path: root/kdesktop/main.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-06-21 21:49:09 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-06-30 21:33:46 +0900
commit409442c1ea8f167485642fbdb3494ff58900966f (patch)
tree350b10883cbcabf5c46beea5405b5a5a7b8786ac /kdesktop/main.cpp
parenta3f0904f6aac929e3c8616ab769c062c24714648 (diff)
downloadtdebase-409442c1ea8f167485642fbdb3494ff58900966f.tar.gz
tdebase-409442c1ea8f167485642fbdb3494ff58900966f.zip
kdesktop: fix deadlock condition between kdesktop and kdesktop lock.
The logic to handle communication with kdesktop_lock is now running completely in a separate thread and event loop, meaning the main GUI thread remains responsive all the time and can handle interaction with X11, DCOP and DBUS calls. This resolves issue #589. The commit also solves the first problem reported in issue #640 and loosely related to PR #526. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kdesktop/main.cpp')
-rw-r--r--kdesktop/main.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/kdesktop/main.cpp b/kdesktop/main.cpp
index f3e61e2f2..0465068b6 100644
--- a/kdesktop/main.cpp
+++ b/kdesktop/main.cpp
@@ -71,7 +71,7 @@ static TDECmdLineOptions options[] =
};
bool argb_visual = false;
-KDesktopApp *myApp = NULL;
+KDesktopApp *myApp = nullptr;
// -----------------------------------------------------------------------------
@@ -251,7 +251,7 @@ extern "C" TDE_EXPORT int kdemain( int argc, char **argv )
else
XCloseDisplay( dpy );
}
- if( myApp == NULL )
+ if (!myApp)
myApp = new KDesktopApp;
#else
myApp = new KDesktopApp;
@@ -260,9 +260,6 @@ extern "C" TDE_EXPORT int kdemain( int argc, char **argv )
KDesktopSettings::instance(kdesktop_name + "rc");
- bool x_root_hack = args->isSet("x-root");
- bool wait_for_kded = args->isSet("waitforkded");
-
// This MUST be created before any widgets are created
SaverEngine saver;
@@ -279,16 +276,15 @@ extern "C" TDE_EXPORT int kdemain( int argc, char **argv )
myApp->config()->reparseConfiguration();
}
- // for the KDE-already-running check in starttde
- TDESelectionOwner kde_running( "_KDE_RUNNING", 0 );
- kde_running.claim( false );
+ // for the TDE-already-running check in starttde
+ TDESelectionOwner tde_running( "_KDE_RUNNING", 0 );
+ tde_running.claim( false );
+ bool x_root_hack = args->isSet("x-root");
+ bool wait_for_kded = args->isSet("waitforkded");
KDesktop desktop( &saver, x_root_hack, wait_for_kded );
args->clear();
-
myApp->dcopClient()->setDefaultObject( "KDesktopIface" );
-
-
return myApp->exec();
}