Xfce/Tasklist fixed width

Tasklist fixed width
Starting from Xfce 4.6 the task list plugin behavior has changed. The option 'width' got replaced with 'minimum width', making it impossible to keep floating panel width constant with task list in it: as new windows get opened the task list will grow and the floating panel will change its size accordingly.

This article discusses the way you can patch Xfce 4.6 task list plugin to revert back to the behavior it had in Xfce 4.4.

Process
Start with creating a local portage tree. If you already have a local portage tree, you can continue to the next step.

Copy xfce4-panel package from the portage tree (default is ):

Insert the next section into the ebuild file in the local portage (for Xfce 4.6.1 it is xfce4-panel-4.6.1.ebuild): src_unpack { unpack ${A} cd ${S} epatch ${FILESDIR}/tasklist_fixwidth.patch }

Create a patch file called tasklist_fixwidth.patch in files directory, and populate it with the next content:

index 32a4bcd..d04ef08 100644 --- plugins/tasklist/tasklist-dialogs.c +++ plugins/tasklist/tasklist-dialogs.c @@ -169,7 +169,7 @@ tasklist_dialogs_configure (TasklistPlugin *tasklist) hbox = gtk_hbox_new (FALSE, 12); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); -   label = gtk_label_new_with_mnemonic (_("_Minimum width:")); +   label = gtk_label_new_with_mnemonic (_("_Width:")); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); diff --git a/plugins/tasklist/tasklist.c b/plugins/tasklist/tasklist.c index 28b5fa1..cb0a4c6 100644 --- plugins/tasklist/tasklist.c +++ plugins/tasklist/tasklist.c @@ -289,8 +289,7 @@ tasklist_plugin_size_request (TasklistPlugin *tasklist,            size += TASKLIST_HANDLE_SIZE;         /* use the requested size when it is bigger then the prefered size */ -        if (tasklist->width > size) -           size = tasklist->width; +        size = tasklist->width;         /* get plugin orientation */         orientation = xfce_panel_plugin_get_orientation (tasklist->panel_plugin); (original patch)

After modification is made to the ebuild file and the patch file created a new digest and manifest must be generated:

All that is left is to run emerge: