all repos — tint2 @ d47cfb0761300183646ed7a876d747a8e8a9ac6c

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

allow multi_desktop even with multi monitors config

git-svn-id: http://tint2.googlecode.com/svn/trunk@104 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
lorthiois@bbsoft.fr lorthiois@bbsoft.fr@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
commit

d47cfb0761300183646ed7a876d747a8e8a9ac6c

parent

39480ccace635f5b46db6790a10ec43f4d8adafa

7 files changed, 18 insertions(+), 19 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,3 +1,6 @@

+2009-06-08 +- allow 'taskbar_mode = multi_desktop' config with 'panel_monitor = all' + 2009-06-07 - merge autotool build system by Christian Ruppert
M doc/tint2.1doc/tint2.1

@@ -36,7 +36,8 @@ should also work with other window managers. It's based on ttm code. The goal is to keep a clean and unintrusive look with code lightweight and

compliance with freedesktop specifications. .PP On the first startup tint2 creates a config file in $HOME/.config/tint2/tint2rc. -See the /usr/share/tint2/doc directory for more information. +See the /usr/share/doc/tint2 directory for more information. +Or the wiki page on http://code.google.com/p/tint2/wiki/Welcome .SH OPTIONS .TP .B \-c config-file
M src/config.csrc/config.c

@@ -415,9 +415,8 @@ }

/* 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);

@@ -505,9 +504,8 @@

/* 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));
M src/panel.csrc/panel.c

@@ -118,11 +118,7 @@ }

// 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);

@@ -229,7 +225,7 @@ Taskbar *taskbar;

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 {

@@ -254,8 +250,8 @@ g_free(name);

} // 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 };

@@ -276,7 +272,7 @@ XChangeProperty (server.dsp, p->main_win, server.atom._NET_WM_STRUT, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &struts, 4);

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;
M src/panel.hsrc/panel.h

@@ -32,7 +32,7 @@ extern int mouse_scroll_up;

extern int mouse_scroll_down; //panel mode -enum { SINGLE_DESKTOP=0, MULTI_DESKTOP, SINGLE_MONITOR }; +enum { SINGLE_DESKTOP=0, MULTI_DESKTOP }; extern int panel_mode; extern int wm_menu;
M src/taskbar/task.csrc/taskbar/task.c

@@ -45,7 +45,8 @@ Task new_tsk;

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

@@ -64,7 +65,7 @@ int i, j;

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));
M src/tint.csrc/tint.c

@@ -478,7 +478,7 @@

void event_configure_notify (Window win) { - if (panel_mode != SINGLE_MONITOR) return; + if (nb_panel == 1) return; if (server.nb_monitor == 1) return; Task *tsk = task_get_task (win);