Remove _NET_WM_ICON_GEOMETRY for hidden task buttons (issue #634)
This commit is contained in:
parent
87ca207107
commit
8917a4d15b
1 changed files with 45 additions and 26 deletions
|
@ -289,7 +289,12 @@ void task_update_icon(Task *task)
|
|||
icon_data[j] = tmp_data[j];
|
||||
img = imlib_create_image_using_copied_data(w, h, icon_data);
|
||||
if (img)
|
||||
fprintf(stderr, "%s: Got %dx%d icon via _NET_WM_ICON for %s\n", __FUNCTION__, w, h, task->title ? task->title : "task");
|
||||
fprintf(stderr,
|
||||
"%s: Got %dx%d icon via _NET_WM_ICON for %s\n",
|
||||
__FUNCTION__,
|
||||
w,
|
||||
h,
|
||||
task->title ? task->title : "task");
|
||||
XFree(data);
|
||||
}
|
||||
}
|
||||
|
@ -308,7 +313,12 @@ void task_update_icon(Task *task)
|
|||
imlib_context_set_drawable(hints->icon_pixmap);
|
||||
img = imlib_create_image_from_drawable(hints->icon_mask, 0, 0, w, h, 0);
|
||||
if (img)
|
||||
fprintf(stderr, "%s: Got %dx%d pixmap icon via WM_HINTS for %s\n", __FUNCTION__, w, h, task->title ? task->title : "task");
|
||||
fprintf(stderr,
|
||||
"%s: Got %dx%d pixmap icon via WM_HINTS for %s\n",
|
||||
__FUNCTION__,
|
||||
w,
|
||||
h,
|
||||
task->title ? task->title : "task");
|
||||
}
|
||||
XFree(hints);
|
||||
}
|
||||
|
@ -485,7 +495,11 @@ void on_change_task(void *obj)
|
|||
Task *task = (Task *)obj;
|
||||
Panel *panel = (Panel *)task->area.panel;
|
||||
|
||||
long value[] = {panel->posx + task->area.posx, panel->posy + task->area.posy, task->area.width, task->area.height};
|
||||
if (task->area.on_screen) {
|
||||
long value[] = {panel->posx + task->area.posx,
|
||||
panel->posy + task->area.posy,
|
||||
task->area.width,
|
||||
task->area.height};
|
||||
XChangeProperty(server.display,
|
||||
task->win,
|
||||
server.atom._NET_WM_ICON_GEOMETRY,
|
||||
|
@ -494,6 +508,11 @@ void on_change_task(void *obj)
|
|||
PropModeReplace,
|
||||
(unsigned char *)value,
|
||||
4);
|
||||
} else {
|
||||
XDeleteProperty(server.display,
|
||||
task->win,
|
||||
server.atom._NET_WM_ICON_GEOMETRY);
|
||||
}
|
||||
}
|
||||
|
||||
Task *find_active_task(Task *current_task)
|
||||
|
|
Loading…
Reference in a new issue