Compare commits
1 Commits
spacer
...
title-race
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5450dcca0b |
10
src/panel.c
10
src/panel.c
@@ -505,16 +505,6 @@ void set_panel_items_order(Panel *p)
|
|||||||
}
|
}
|
||||||
if (panel_items_order[k] == 'C')
|
if (panel_items_order[k] == 'C')
|
||||||
p->area.list = g_slist_append(p->area.list, &p->clock);
|
p->area.list = g_slist_append(p->area.list, &p->clock);
|
||||||
if (panel_items_order[k] == 'F') {
|
|
||||||
Area *spacer = calloc(sizeof(Area), 1);
|
|
||||||
spacer->panel = p;
|
|
||||||
spacer->parent = p;
|
|
||||||
spacer->bg = &g_array_index(backgrounds, Background, 0);
|
|
||||||
spacer->on_screen = 1;
|
|
||||||
spacer->size_mode = SIZE_BY_LAYOUT;
|
|
||||||
spacer->gc = 1;
|
|
||||||
p->area.list = g_slist_append(p->area.list, spacer);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
init_rendering(&p->area, 0);
|
init_rendering(&p->area, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ Task *add_task (Window win)
|
|||||||
if (!win) return 0;
|
if (!win) return 0;
|
||||||
if (window_is_hidden(win)) return 0;
|
if (window_is_hidden(win)) return 0;
|
||||||
|
|
||||||
|
XSelectInput(server.dsp, win, PropertyChangeMask|StructureNotifyMask);
|
||||||
|
XFlush(server.dsp);
|
||||||
|
|
||||||
int monitor;
|
int monitor;
|
||||||
if (nb_panel > 1) {
|
if (nb_panel > 1) {
|
||||||
monitor = window_get_monitor (win);
|
monitor = window_get_monitor (win);
|
||||||
@@ -75,8 +78,7 @@ Task *add_task (Window win)
|
|||||||
get_title(&new_tsk);
|
get_title(&new_tsk);
|
||||||
get_icon(&new_tsk);
|
get_icon(&new_tsk);
|
||||||
|
|
||||||
//printf("task %s : desktop %d, monitor %d\n", new_tsk->title, desktop, monitor);
|
//printf("new task %s win %u: desktop %d, monitor %d\n", new_tsk.title, win, new_tsk.desktop, monitor);
|
||||||
XSelectInput (server.dsp, new_tsk.win, PropertyChangeMask|StructureNotifyMask);
|
|
||||||
|
|
||||||
GPtrArray* task_group = g_ptr_array_new();
|
GPtrArray* task_group = g_ptr_array_new();
|
||||||
Taskbar *tskbar;
|
Taskbar *tskbar;
|
||||||
|
|||||||
@@ -727,6 +727,7 @@ void event_property_notify (XEvent *e)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tsk = task_get_task (win);
|
tsk = task_get_task (win);
|
||||||
|
//printf("change win = %u, task = %p\n", win, tsk);
|
||||||
if (!tsk) {
|
if (!tsk) {
|
||||||
if (at != server.atom._NET_WM_STATE)
|
if (at != server.atom._NET_WM_STATE)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -277,7 +277,6 @@ int resize_by_layout(void *obj, int maximum_size)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// detect free size for SIZE_BY_LAYOUT's Area
|
// detect free size for SIZE_BY_LAYOUT's Area
|
||||||
// TODO the spacer should collapse when the other areas are overflowing
|
|
||||||
size = a->height - (2 * (a->paddingxlr + a->bg->border.width));
|
size = a->height - (2 * (a->paddingxlr + a->bg->border.width));
|
||||||
GSList *l;
|
GSList *l;
|
||||||
for (l = a->list ; l ; l = l->next) {
|
for (l = a->list ; l ; l = l->next) {
|
||||||
@@ -472,8 +471,6 @@ void free_area (Area *a)
|
|||||||
XFreePixmap (server.dsp, a->pix);
|
XFreePixmap (server.dsp, a->pix);
|
||||||
a->pix = 0;
|
a->pix = 0;
|
||||||
}
|
}
|
||||||
if (a->gc)
|
|
||||||
free(a);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ typedef struct {
|
|||||||
int resize;
|
int resize;
|
||||||
// need redraw Pixmap
|
// need redraw Pixmap
|
||||||
int redraw;
|
int redraw;
|
||||||
int gc;
|
|
||||||
// paddingxlr = horizontal padding left/right
|
// paddingxlr = horizontal padding left/right
|
||||||
// paddingx = horizontal padding between childs
|
// paddingx = horizontal padding between childs
|
||||||
int paddingxlr, paddingx, paddingy;
|
int paddingxlr, paddingx, paddingy;
|
||||||
|
|||||||
Reference in New Issue
Block a user