diff options
author | Denis Kozadaev <denis@dilos.org> | 2023-05-18 21:41:25 +0300 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-05-23 10:14:51 +0900 |
commit | d984205f2e2e53941bce2efb99252feb6a4c046e (patch) | |
tree | 71092a76f19990d9072233a2c02e687ee518da64 /kicker/taskbar | |
parent | f3f71a018f383fe1cdf2d7e402c95325ba81c6a3 (diff) | |
download | tdebase-d984205f2e2e53941bce2efb99252feb6a4c046e.tar.gz tdebase-d984205f2e2e53941bce2efb99252feb6a4c046e.zip |
SunOS specific patches
Signed-off-by: Denis Kozadaev <denis@dilos.org>
(cherry picked from commit 4d58a4ea8daf1a3cb91b7d8c6e574dd6f5bdb685)
Diffstat (limited to 'kicker/taskbar')
-rw-r--r-- | kicker/taskbar/taskcontainer.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/kicker/taskbar/taskcontainer.cpp b/kicker/taskbar/taskcontainer.cpp index 6ffd688d3..b0e00964c 100644 --- a/kicker/taskbar/taskcontainer.cpp +++ b/kicker/taskbar/taskcontainer.cpp @@ -26,6 +26,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <assert.h> +#ifdef Q_OS_SOLARIS +#include <procfs.h> +#endif /* SunOS */ + #include <tqbitmap.h> #include <tqcolor.h> #include <tqcursor.h> @@ -96,6 +100,18 @@ static void create_atoms(Display *d) { } bool is_process_resumable(pid_t pid) { +#ifdef Q_OS_SOLARIS + TQFile procStatFile(TQString("/proc/%1/lwp/1/lwpsinfo").arg(pid)); + if (procStatFile.open(IO_ReadOnly)) { + TQByteArray statRaw = procStatFile.readAll(); + lwpsinfo_t *inf = (lwpsinfo_t *)statRaw.data(); + + procStatFile.close(); + if( inf->pr_sname == 'T' ) { + return true; + } + } +#else /* default */ TQFile procStatFile(TQString("/proc/%1/stat").arg(pid)); if (procStatFile.open(IO_ReadOnly)) { TQByteArray statRaw = procStatFile.readAll(); @@ -107,13 +123,9 @@ bool is_process_resumable(pid_t pid) { if( state == "T" ) { return true; } - else { - return false; - } - } - else { - return false; } +#endif /* read process status */ + return false; } TaskContainer::TaskContainer(Task::Ptr task, TaskBar* bar, TaskBarSettings* settingsObject, TaskBarSettings* globalSettingsObject, TQWidget *parent, const char *name) |