Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
496f26afd9 |
2 changed files with 18 additions and 17 deletions
|
@ -165,7 +165,7 @@ void handle_event_property_notify(XEvent *e)
|
||||||
l = l->next;
|
l = l->next;
|
||||||
for (; l; l = l->next) {
|
for (; l; l = l->next) {
|
||||||
Task *task = l->data;
|
Task *task = l->data;
|
||||||
if (task->desktop == ALL_DESKTOPS) {
|
if (task->current_state == TASK_ICONIFIED) {
|
||||||
task->area.on_screen = TRUE;
|
task->area.on_screen = TRUE;
|
||||||
taskbar->area.resize_needed = 1;
|
taskbar->area.resize_needed = 1;
|
||||||
if (taskbar_mode == MULTI_DESKTOP)
|
if (taskbar_mode == MULTI_DESKTOP)
|
||||||
|
|
|
@ -124,8 +124,6 @@ Task *add_task(Window win)
|
||||||
|
|
||||||
GPtrArray *task_buttons = g_ptr_array_new();
|
GPtrArray *task_buttons = g_ptr_array_new();
|
||||||
for (int j = 0; j < panels[monitor].num_desktops; j++) {
|
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];
|
Taskbar *taskbar = &panels[monitor].taskbar[j];
|
||||||
Task *task_instance = calloc(1, sizeof(Task));
|
Task *task_instance = calloc(1, sizeof(Task));
|
||||||
|
@ -143,9 +141,6 @@ Task *add_task(Window win)
|
||||||
task_instance->win_w = task_template.win_w;
|
task_instance->win_w = task_template.win_w;
|
||||||
task_instance->win_h = task_template.win_h;
|
task_instance->win_h = task_template.win_h;
|
||||||
task_instance->current_state = TASK_UNDEFINED; // to update the current state later in set_task_state...
|
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->title = task_template.title;
|
||||||
task_instance->application = task_template.application;
|
task_instance->application = task_template.application;
|
||||||
if (panels[monitor].g_task.tooltip_enabled) {
|
if (panels[monitor].g_task.tooltip_enabled) {
|
||||||
|
@ -743,18 +738,22 @@ void set_task_state(Task *task, TaskState state)
|
||||||
schedule_redraw(&task1->area);
|
schedule_redraw(&task1->area);
|
||||||
if (state == TASK_ACTIVE && g_slist_find(urgent_list, task1))
|
if (state == TASK_ACTIVE && g_slist_find(urgent_list, task1))
|
||||||
del_urgent(task1);
|
del_urgent(task1);
|
||||||
gboolean hide = FALSE;
|
gboolean hide = TRUE;
|
||||||
Taskbar *taskbar = (Taskbar *)task1->area.parent;
|
|
||||||
|
/* don't need this logic */
|
||||||
|
/* Taskbar *taskbar = (Taskbar *)task1->area.parent;
|
||||||
if (task->desktop == ALL_DESKTOPS && server.desktop != taskbar->desktop) {
|
if (task->desktop == ALL_DESKTOPS && server.desktop != taskbar->desktop) {
|
||||||
// Hide ALL_DESKTOPS task on non-current desktop
|
// Hide ALL_DESKTOPS task on non-current desktop
|
||||||
hide = !always_show_all_desktop_tasks;
|
hide = !always_show_all_desktop_tasks;
|
||||||
}
|
}*/
|
||||||
if (hide_inactive_tasks) {
|
/*if (hide_inactive_tasks) {
|
||||||
// Show only the active task
|
// Show only the active task*/
|
||||||
if (state != TASK_ACTIVE) {
|
if (state == TASK_ICONIFIED) {
|
||||||
hide = TRUE;
|
hide = FALSE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
/*nor this logic*/
|
||||||
|
/*}
|
||||||
if (hide_task_diff_desktop) {
|
if (hide_task_diff_desktop) {
|
||||||
if (taskbar->desktop != server.desktop)
|
if (taskbar->desktop != server.desktop)
|
||||||
hide = TRUE;
|
hide = TRUE;
|
||||||
|
@ -762,9 +761,9 @@ void set_task_state(Task *task, TaskState state)
|
||||||
if (get_window_monitor(task->win) != ((Panel *)task->area.panel)->monitor &&
|
if (get_window_monitor(task->win) != ((Panel *)task->area.panel)->monitor &&
|
||||||
(hide_task_diff_monitor || num_panels > 1)) {
|
(hide_task_diff_monitor || num_panels > 1)) {
|
||||||
hide = TRUE;
|
hide = TRUE;
|
||||||
}
|
}*/
|
||||||
if ((!hide) != task1->area.on_screen) {
|
if ((!hide) != task1->area.on_screen) {
|
||||||
task1->area.on_screen = !hide;
|
task1->area.on_screen = task1->current_state == TASK_ICONIFIED;
|
||||||
schedule_redraw(&task1->area);
|
schedule_redraw(&task1->area);
|
||||||
Panel *p = (Panel *)task->area.panel;
|
Panel *p = (Panel *)task->area.panel;
|
||||||
task->area.resize_needed = TRUE;
|
task->area.resize_needed = TRUE;
|
||||||
|
@ -844,8 +843,10 @@ void task_handle_mouse_event(Task *task, MouseAction action)
|
||||||
case TOGGLE_ICONIFY:
|
case TOGGLE_ICONIFY:
|
||||||
if (active_task && task->win == active_task->win)
|
if (active_task && task->win == active_task->win)
|
||||||
XIconifyWindow(server.display, task->win, server.screen);
|
XIconifyWindow(server.display, task->win, server.screen);
|
||||||
else
|
else {
|
||||||
|
change_window_desktop(task->win, server.desktop);
|
||||||
activate_window(task->win);
|
activate_window(task->win);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SHADE:
|
case SHADE:
|
||||||
toggle_window_shade(task->win);
|
toggle_window_shade(task->win);
|
||||||
|
|
Loading…
Reference in a new issue