2007-07-26 23:58:25 +00:00
|
|
|
This fixes a problem of overaggressively grouping windows in the
|
|
|
|
tasklist with our default size 24 panel. See bnc #148840 for
|
|
|
|
details and a screenshot.
|
|
|
|
|
|
|
|
Index: libwnck/tasklist.c
|
|
|
|
===================================================================
|
2007-08-02 15:26:04 +00:00
|
|
|
--- libwnck/tasklist.c.orig
|
|
|
|
+++ libwnck/tasklist.c
|
|
|
|
@@ -216,6 +216,9 @@ struct _WnckTasklistPrivate
|
|
|
|
int *size_hints;
|
|
|
|
int size_hints_len;
|
2007-07-26 23:58:25 +00:00
|
|
|
|
|
|
|
+ gint last_width;
|
|
|
|
+ gint last_height;
|
|
|
|
+
|
|
|
|
WnckLoadIconFunction icon_loader;
|
|
|
|
void *icon_loader_data;
|
|
|
|
GDestroyNotify free_icon_loader_data;
|
2007-08-02 15:26:04 +00:00
|
|
|
@@ -692,6 +695,9 @@ wnck_tasklist_init (WnckTasklist *taskli
|
|
|
|
for (i = 0; i < N_SCREEN_CONNECTIONS; i++)
|
|
|
|
tasklist->priv->screen_connections[i] = 0;
|
2007-07-26 23:58:25 +00:00
|
|
|
|
|
|
|
+ tasklist->priv->last_width = -1;
|
|
|
|
+ tasklist->priv->last_height = -1;
|
|
|
|
+
|
|
|
|
tasklist->priv->idle_callback_tag = 0;
|
|
|
|
|
2007-08-02 15:26:04 +00:00
|
|
|
tasklist->priv->size_hints = NULL;
|
|
|
|
@@ -1324,8 +1330,16 @@ wnck_tasklist_size_request (GtkWidget
|
|
|
|
tasklist->priv->max_button_width = wnck_tasklist_get_button_size (widget);
|
|
|
|
tasklist->priv->max_button_height = max_height;
|
|
|
|
|
|
|
|
- fake_allocation.width = GTK_WIDGET (tasklist)->allocation.width;
|
|
|
|
- fake_allocation.height = GTK_WIDGET (tasklist)->allocation.height;
|
|
|
|
+ /* fake_allocation.width = GTK_WIDGET (tasklist)->allocation.width;
|
|
|
|
+ fake_allocation.height = GTK_WIDGET (tasklist)->allocation.height; */
|
2007-07-26 23:58:25 +00:00
|
|
|
+ if (tasklist->priv->last_width != -1)
|
2007-08-02 15:26:04 +00:00
|
|
|
+ fake_allocation.width = tasklist->priv->last_width;
|
2007-07-26 23:58:25 +00:00
|
|
|
+ else
|
2007-08-02 15:26:04 +00:00
|
|
|
+ fake_allocation.width = GTK_WIDGET (tasklist)->allocation.width;
|
2007-07-26 23:58:25 +00:00
|
|
|
+ if (tasklist->priv->last_height != -1)
|
2007-08-02 15:26:04 +00:00
|
|
|
+ fake_allocation.height = tasklist->priv->last_height;
|
2007-07-26 23:58:25 +00:00
|
|
|
+ else
|
2007-08-02 15:26:04 +00:00
|
|
|
+ fake_allocation.height = GTK_WIDGET (tasklist)->allocation.height;
|
2007-07-26 23:58:25 +00:00
|
|
|
|
|
|
|
array = g_array_new (FALSE, FALSE, sizeof (int));
|
|
|
|
|
2007-08-02 15:26:04 +00:00
|
|
|
@@ -1501,6 +1515,9 @@ wnck_tasklist_size_allocate (GtkWidget
|
2007-07-26 23:58:25 +00:00
|
|
|
|
|
|
|
tasklist = WNCK_TASKLIST (widget);
|
2007-08-02 15:26:04 +00:00
|
|
|
|
2007-07-26 23:58:25 +00:00
|
|
|
+ tasklist->priv->last_width = allocation->width;
|
|
|
|
+ tasklist->priv->last_height = allocation->height;
|
2007-08-02 15:26:04 +00:00
|
|
|
+
|
2007-07-26 23:58:25 +00:00
|
|
|
n_windows = g_list_length (tasklist->priv->windows);
|
|
|
|
n_startup_sequences = g_list_length (tasklist->priv->startup_sequences);
|
2007-08-02 15:26:04 +00:00
|
|
|
n_grouped_buttons = 0;
|