diff options
author | Denis Kozadaev <[email protected]> | 2023-05-18 21:41:25 +0300 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2023-05-22 20:07:54 +0200 |
commit | 4d58a4ea8daf1a3cb91b7d8c6e574dd6f5bdb685 (patch) | |
tree | 564b7622f7025d976f0a0ac1cd9ed82ea14239dd /kicker/taskbar | |
parent | bd5494bc81ed0034cde41a34e6a6e8b813b7814b (diff) | |
download | tdebase-4d58a4ea8daf1a3cb91b7d8c6e574dd6f5bdb685.tar.gz tdebase-4d58a4ea8daf1a3cb91b7d8c6e574dd6f5bdb685.zip |
SunOS specific patches
Signed-off-by: Denis Kozadaev <[email protected]>
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) |