summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2023-07-30 13:36:50 -0400
committerLuke from DC <[email protected]>2023-07-31 17:20:22 +0000
commitfff4b7e24868e7a8fa3634f618c6bdf813f402ca (patch)
treee74b00e10186b456f6d5c7cc8ff9fac0a58479c6 /applets
parente20f321294a83eb50481999177ab090036cc9270 (diff)
downloadmate-panel-fff4b7e24868e7a8fa3634f618c6bdf813f402ca.tar.bz2
mate-panel-fff4b7e24868e7a8fa3634f618c6bdf813f402ca.tar.xz
wayland-tasklist: really set maximum label width
*Otherwise taskbuttons for programs using URLs or filenames in the window name can balloon across the whole taskbar
Diffstat (limited to 'applets')
-rw-r--r--applets/wncklet/wayland-backend.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/applets/wncklet/wayland-backend.c b/applets/wncklet/wayland-backend.c
index 406b29c7..f10b2d65 100644
--- a/applets/wncklet/wayland-backend.c
+++ b/applets/wncklet/wayland-backend.c
@@ -31,6 +31,9 @@
#include "wayland-backend.h"
#include "wayland-protocol/wlr-foreign-toplevel-management-unstable-v1-client.h"
+/*shorter than wnck-tasklist due to common use of larger fonts*/
+#define TASKLIST_TEXT_MAX_WIDTH 16
+
/*In the future this could be changable from the panel-prefs dialog*/
static const int max_button_width = 180;
static const int icon_size = 16;
@@ -552,7 +555,7 @@ toplevel_task_new (TasklistManager *tasklist, struct zwlr_foreign_toplevel_handl
task->icon = gtk_image_new_from_icon_name ("unknown", icon_size);
task->label = gtk_label_new ("");
- gtk_label_set_width_chars (GTK_LABEL (task->label), -1);
+ gtk_label_set_max_width_chars (GTK_LABEL (task->label), TASKLIST_TEXT_MAX_WIDTH);
gtk_label_set_ellipsize (GTK_LABEL (task->label), PANGO_ELLIPSIZE_END);
gtk_label_set_xalign (GTK_LABEL (task->label), 0.0);