Commit Graph

62 Commits

Author SHA1 Message Date
correctmost
9bf1713e82 Fix UBSan errors 2024-01-24 14:03:22 +00:00
4882d673a3 Dark mode for process-statusbar 2023-11-22 20:01:24 +01:00
Gaël Bonithon
fb824362dc Fix blurry app icons when UI scale > 1 2023-10-06 23:58:56 +02:00
Waldemar Zimpel
bd56f2ed5e Rounded legend icons 2023-09-16 15:07:43 +00:00
Gaël Bonithon
c5714580a9 Properly finalize global objects in main 2023-09-11 09:06:34 +02:00
Gaël Bonithon
4209c4ac41 Fix more memory leaks
Found by Valgrind when starting xfce4-taskmanager.
2023-09-10 12:01:40 +02:00
Gaël Bonithon
30185130f2 Make libx11 optional, guard x11 code paths
It's not clear whether libwnck-based functionality will ever have a
counterpart on Wayland, so it seems pointless to replace libwnck with
libxfce4windowing at this stage.

Completes: ecd1e1a645
Related: #75, #78
2023-09-05 17:01:23 +02:00
Brian Tarricone
ecd1e1a645 Add minimal support for Wayland
This just gets it running properly, but disables features that are
difficult or impossible to do on Wayland (the window selector, and the
stuff that uses libwnck).  At least it doesn't segfault on startup
anymore.

Fixes: #73
2023-03-24 10:51:15 +00:00
Hunter Turcin
8a4ad6c8a3 Allow to copy full process command line (#33) 2022-03-04 01:39:12 +00:00
Jan Ziak
bed04577a5 Add support for MemAvailable (!10)
MemAvailable is in /proc/meminfo since Linux 3.14.

This aligns the reported memory usage with the memory usage
reported by xfce4-systemload-plugin.

Closes !10
2020-10-12 14:57:23 -03:00
DanielChabrowski
aa7b425613 Fix indentation 2020-07-16 14:24:49 +02:00
DanielChabrowski
5a26e83574 Fix GTimeVal deprecation warning 2020-07-15 03:27:10 +02:00
Rozhuk Ivan
e365bf17ad Fix: some times processes does not remove from list 2020-07-14 23:31:16 +02:00
Mikhail Efremov
c6e33f3048 Fix mem size calculation once more
A terminating null byte should be moved too.
Fixes commit b4266a20f8.
2018-12-11 18:43:21 +01:00
Landry Breuil
203514ff96 add proper casts around gsize calculation 2018-12-10 08:01:33 +01:00
rim
b4266a20f8 Make valngrind happy: correct calculate mem size to move 2018-12-10 07:58:01 +01:00
rim
b89684865d Better utf-8 normalization (bug 14172) 2018-08-02 08:47:51 +02:00
Landry Breuil
993ef78b81 Switch back all bzero() calls to use memset()
Even if it's uglier to use memset, bzero seems deprecated.
2018-06-03 17:56:31 +02:00
rim
f51c2b18f7 Rework the way model is iterated through (bug 14401) 2018-05-30 21:56:48 +02:00
rim
3d7f9fd794 parenthesis around addition (bug 14401) 2018-05-30 21:53:33 +02:00
rim
1c09b7329b Use the proper types, add casts where necessary (bug 14401) 2018-05-30 21:46:29 +02:00
rim
0111851b4d Stop displaying 'Running as <uid> on <hostname>' and remove corresponding code (bug 14401) 2018-05-30 21:31:52 +02:00
rim
8e1b48f8de Move getpwuid() from backends to gui, use getpwuid_r(), call only once on task add. (bug 14401) 2018-05-30 21:31:01 +02:00
rim
66a0d4bfc9 Mark unused params, remove unused macro and args (bug 14401) 2018-05-30 21:29:28 +02:00
rim
ceb5a7d347 Make pid type: GPid (bug 14401) 2018-05-30 21:28:35 +02:00
Landry Breuil
c507f13d86 declarations at the beginning of functions (ISO C90 forbids mixed declarations and code) 2018-05-28 21:06:39 +02:00
rim
8d4f013877 Simplify WNCK #ifdefs 2018-05-28 21:05:17 +02:00
Rozhuk Ivan
fd9e313e2e Make sure only printable characters are used in the pretty cmdline display (bug 14172) 2018-05-27 12:00:01 +02:00
Rozhuk Ivan
fd149b63df Rework the way the model is updated (bug 14403)
- Do more lazy updates
- More robust to quick process creation/deletion
- Use bsearch to look in the sorted list of processes.

Should consume less resources..
2018-05-27 11:35:00 +02:00
rim
a76b13057c Use sizeof in get_hostname (bug 14401) 2018-05-27 11:04:42 +02:00
rim
4d4d0b5073 Add a function comparing tasks (bug 14403) 2018-05-26 23:48:46 +02:00
rim
5e0fb6f4bc Use sizeof() when appropriate instead of hardcoding values (bug 14401, bug 14403) 2018-05-26 23:19:55 +02:00
Simon Steinbeiss
c1de490489 Tone down the colors in the treeview 2014-12-18 13:28:04 +01:00
Harald Judt
134e0c278f Use g_format_size_full with G_FORMAT_SIZE_IEC_UNITS for RAM
This makes it more consistent with what other tools report.
2014-12-07 13:37:53 +01:00
Landry Breuil
c6c74cd959 Display the memory usage as bytes instead of a percentage when show-memory-in-xbytes is set (#6503)
- move the percentage calculation to init_timeout(), use g_format_size() here too
- carry memory/swap used vs total all around
- make the XtmProcessStatusbar swap and memory properties strings instead of float

Based on a diff from  Ján Sucan, thanks!

Note to translators: this changes some strings, mostly removing % in format printing
2014-12-04 20:52:12 +01:00
Landry Breuil
76dd1025e9 Remove memory_human_size and use g_format_size instead 2014-12-04 20:39:26 +01:00
Landry Breuil
59ed589b26 Use g_strlcpy() instead of g_snprintf(dest, strlen(dest), "%s", src)
Fixes a SIGABRT at startup on OpenBSD, for some reason deep in the glib/libc
stack the va_list arg p is lost.. g_strlcpy() is equivalent here, and even faster.
2014-11-29 11:48:38 +01:00
Landry Breuil
92675eba53 Use g_utf8_strlen(text, -1) to check for text length, not sizeof(text) which is the size of a pointer and always > 3 2014-11-29 11:41:58 +01:00
Nick Schermer
b367fdd1a9 Fix compiler warnings. 2014-01-08 19:35:17 +01:00
Mike Massonnet
81bdc6d2ba Fix compiler warnings (original patches from Enrico Tröger)
Add missing include for geteuid() missing declaration
xtm_process_window_show_swap_usage() in process-window.
Fix various compiler warnings from main.c task-manager.c and
app-manager.c.
2010-06-08 22:41:50 +02:00
Mike Massonnet
2f995e8226 Display window icons/names
Add optional link on libwnck (default=yes) and build a new object from
app-manager.c to keep an up to date list of applications with their name
and icon. Use it inside the task manager object to display inside the
tree view.
2010-06-04 15:31:45 +02:00
Mike Massonnet
bb4c139c73 Fix g_snprintf call for task name
Don't pass task name as format, instead call g_snprintf safely with "%s"
and pass the task name as an argument.
2010-06-03 23:46:55 +02:00
Mike Massonnet
46174f188c Update command line when needed 2010-06-02 16:27:47 +02:00
Mike Massonnet
06921c3ac1 Plug a dynamic leak
A leak occured in the timer code, and thus the memory was growing over
time. Cf. src/task-manager.c(model_update_tree_iter), the old_state
variable was not free'd.

Plugged other static leaks at the same time.
2010-06-02 01:02:40 +02:00
Mike Massonnet
8d32b99253 Replace carriage returns against spaces in commands 2010-05-28 15:48:08 +02:00
Mike Massonnet
ad3391bb95 Show tasks with changed status with a yellow background 2010-05-28 01:32:02 +02:00
Mike Massonnet
fe31827852 Show terminated tasks with a red background 2010-05-27 01:21:26 +02:00
Mike Massonnet
e3d3aa2e18 Show started tasks with a green background 2010-05-26 22:35:34 +02:00
Mike Massonnet
ede8aa2580 Drop foced debug output of initial tasks 2010-05-24 02:27:19 +02:00
Mike Massonnet
4dc36d296a Hide Swap usage from statusbar when swap total equals zero 2010-05-23 19:57:25 +02:00