/* Taskbar */
else if (strcmp (key, "taskbar_mode") == 0) {
- if (strcmp (value, "multi_desktop") == 0) panel_mode = MULTI_DESKTOP;
- else if (strcmp (value, "single_desktop") == 0) panel_mode = SINGLE_DESKTOP;
- else panel_mode = SINGLE_MONITOR;
+ if (strcmp (value, "single_desktop") == 0) panel_mode = SINGLE_DESKTOP;
+ else panel_mode = MULTI_DESKTOP;
}
else if (strcmp (key, "taskbar_padding") == 0) {
extract_values(value, &value1, &value2, &value3);
/* Read tint-0.6 config for backward compatibility */
else if (strcmp (key, "panel_mode") == 0) {
- if (strcmp (value, "multi_desktop") == 0) panel_mode = MULTI_DESKTOP;
- else if (strcmp (value, "single_desktop") == 0) panel_mode = SINGLE_DESKTOP;
- else panel_mode = SINGLE_MONITOR;
+ if (strcmp (value, "single_desktop") == 0) panel_mode = SINGLE_DESKTOP;
+ else panel_mode = MULTI_DESKTOP;
}
else if (strcmp (key, "panel_rounded") == 0) {
Area *a = calloc(1, sizeof(Area));
// Catch some events
XSetWindowAttributes att = { ParentRelative, 0L, 0, 0L, 0, 0, Always, 0L, 0L, False, ExposureMask|ButtonPressMask|ButtonReleaseMask, NoEventMask, False, 0, 0 };
-
- // XCreateWindow(display, parent, x, y, w, h, border, depth, class, visual, mask, attrib)
- // main_win doesn't include panel.area.paddingx, so we have WM capabilities on left and right.
if (p->main_win) XDestroyWindow(server.dsp, p->main_win);
- //win = XCreateWindow (server.dsp, server.root_win, p->posx+p->area.paddingxlr, p->posy, p->area.width-(2*p->area.paddingxlr), p->area.height, 0, server.depth, InputOutput, CopyFromParent, CWEventMask, &att);
p->main_win = XCreateWindow(server.dsp, server.root_win, p->posx, p->posy, p->area.width, p->area.height, 0, server.depth, InputOutput, CopyFromParent, CWEventMask, &att);
set_panel_properties(p);
for (j=0 ; j < panel->nb_desktop ; j++) {
taskbar = &panel->taskbar[j];
if (panel_mode != MULTI_DESKTOP && taskbar->desktop != server.desktop) {
- // (SINGLE_DESKTOP or SINGLE_MONITOR) and not current desktop
+ // SINGLE_DESKTOP and not current desktop
taskbar->area.on_screen = 0;
}
else {
}
// Dock
- //long val = server.atom._NET_WM_WINDOW_TYPE_DOCK;
- //XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, (unsigned char *) &val, 1);
+ long val = server.atom._NET_WM_WINDOW_TYPE_DOCK;
+ XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, (unsigned char *) &val, 1);
// Reserved space
long struts [12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_STRUT_PARTIAL, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &struts, 12);
// Sticky and below other window
- long val = 0xFFFFFFFF;
+ val = 0xFFFFFFFF;
XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_DESKTOP, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &val, 1);
Atom state[4];
state[0] = server.atom._NET_WM_STATE_SKIP_PAGER;
new_tsk.win = win;
new_tsk.area.panel = &panel1[0];
new_tsk.desktop = window_get_desktop (win);
- if (panel_mode == SINGLE_MONITOR) monitor = window_get_monitor (win);
+// if (panel_mode == SINGLE_MONITOR) monitor = window_get_monitor (win);
+ if (nb_panel > 1) monitor = window_get_monitor (win);
else monitor = 0;
// allocate only one title and one icon
for (i=0 ; i < nb_panel ; i++) {
for (j=0 ; j < panel1[i].nb_desktop ; j++) {
if (new_tsk.desktop != ALLDESKTOP && new_tsk.desktop != j) continue;
- if (panel_mode == SINGLE_MONITOR && panel1[i].monitor != monitor) continue;
+ if (nb_panel > 1 && panel1[i].monitor != monitor) continue;
tskbar = &panel1[i].taskbar[j];
new_tsk2 = malloc(sizeof(Task));