hack some stuff to get only minimized windows, across all desktops
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmQIJboACgkQO3+8IhRO Y5i4Zw/+MgAYZXjYja24jJ9Jqjo46lYbFsMiHdmE5WDuN35LWcxpWqFMalfWgwWF vNUqOvbmV4etQt5BGbIZY9fSLPXFmibB/1OrvxaSO5D1112ykwU03MKkh7oKh1cr EsuymZVaPCLgrkC4DoDQ/lXgxABhm/4qbsdTfdTPbca1EZ5QUeJiizWB78GV1ZZk EDvI8nXmcmNtCm315PsUvs5NquX7cVQAcf2EkexZZlZd/tSeJa90eL6VSvtSxMAo hV3xkLDX/oLPx1Qo33Jg8DeQgAgz/UXPhEojCCJosLjPHzkyrfpeBEc4wJkWHUnu pXoDr7t5R76oRnMEjyGR9hliLeOXdRxQEXjiq1Pe2CzSR9yrJ227iWSxK1iJgdH5 30PJ8AH18nHGP9lBcpY8Erv1DiaInMug3228Ws1Pukz+OgH6iASRYTTbxxdcNxh8 Ix2cTx5DdRSp5NVQyuJemkg/HV0dHSnOY/Og1aoLPmMjWxdpp1MRlJHkCowZXqwC iYVHcCo3t6G+kqs98N60cRaUbRJdJQBx9GPGXwzzXFGr/8ev/mZM71hmfaryaqiK erfCK8xi3NKs3+rNPn8nJ9HCaG9MHH5a0bblWmkOfInCmUiz4J7BBborxXh3Qiil AQt8ZwxRuQfJdll7Gvq/iGGH6PkfD0YPdel2A0WHKqrBjSWTEUw= =asZN -----END PGP SIGNATURE-----
2 files changed,
18 insertions(+),
17 deletions(-)
M
src/main.c
→
src/main.c
@@ -165,7 +165,7 @@ if (taskbarname_enabled)
l = l->next; for (; l; l = l->next) { Task *task = l->data; - if (task->desktop == ALL_DESKTOPS) { + if (task->current_state == TASK_ICONIFIED) { task->area.on_screen = TRUE; taskbar->area.resize_needed = 1; if (taskbar_mode == MULTI_DESKTOP)
M
src/taskbar/task.c
→
src/taskbar/task.c
@@ -124,8 +124,6 @@ }
GPtrArray *task_buttons = g_ptr_array_new(); for (int j = 0; j < panels[monitor].num_desktops; j++) { - if (task_template.desktop != ALL_DESKTOPS && task_template.desktop != j) - continue; Taskbar *taskbar = &panels[monitor].taskbar[j]; Task *task_instance = calloc(1, sizeof(Task));@@ -143,9 +141,6 @@ task_instance->win_y = task_template.win_y;
task_instance->win_w = task_template.win_w; task_instance->win_h = task_template.win_h; task_instance->current_state = TASK_UNDEFINED; // to update the current state later in set_task_state... - if (task_instance->desktop == ALL_DESKTOPS && server.desktop != j) { - task_instance->area.on_screen = always_show_all_desktop_tasks; - } task_instance->title = task_template.title; task_instance->application = task_template.application; if (panels[monitor].g_task.tooltip_enabled) {@@ -743,18 +738,22 @@ instantiate_area_gradients(&task1->area);
schedule_redraw(&task1->area); if (state == TASK_ACTIVE && g_slist_find(urgent_list, task1)) del_urgent(task1); - gboolean hide = FALSE; - Taskbar *taskbar = (Taskbar *)task1->area.parent; + gboolean hide = TRUE; + + /* don't need this logic */ + /* Taskbar *taskbar = (Taskbar *)task1->area.parent; if (task->desktop == ALL_DESKTOPS && server.desktop != taskbar->desktop) { // Hide ALL_DESKTOPS task on non-current desktop hide = !always_show_all_desktop_tasks; - } - if (hide_inactive_tasks) { - // Show only the active task - if (state != TASK_ACTIVE) { - hide = TRUE; + }*/ + /*if (hide_inactive_tasks) { + // Show only the active task*/ + if (state == TASK_ICONIFIED) { + hide = FALSE; } - } + + /*nor this logic*/ + /*} if (hide_task_diff_desktop) { if (taskbar->desktop != server.desktop) hide = TRUE;@@ -762,9 +761,9 @@ }
if (get_window_monitor(task->win) != ((Panel *)task->area.panel)->monitor && (hide_task_diff_monitor || num_panels > 1)) { hide = TRUE; - } + }*/ if ((!hide) != task1->area.on_screen) { - task1->area.on_screen = !hide; + task1->area.on_screen = task1->current_state == TASK_ICONIFIED; schedule_redraw(&task1->area); Panel *p = (Panel *)task->area.panel; task->area.resize_needed = TRUE;@@ -844,8 +843,10 @@ break;
case TOGGLE_ICONIFY: if (active_task && task->win == active_task->win) XIconifyWindow(server.display, task->win, server.screen); - else + else { + change_window_desktop(task->win, server.desktop); activate_window(task->win); + } break; case SHADE: toggle_window_shade(task->win);