all repos — tint2 @ 81930a6861be0e93c4410478e9be13ba5e5e975d

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

revert r78, fixed issue 100

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

81930a6861be0e93c4410478e9be13ba5e5e975d

parent

e6c9996ba0a2abf4853273180fca7e56c8dccb1b

3 files changed, 13 insertions(+), 26 deletions(-)

jump to
M ChangeLogChangeLog

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

+2009-06-14 +- revert r78, fixed issue 100 + 2009-06-13 - fixed background refresh on systray
M src/systray/systraybar.csrc/systray/systraybar.c

@@ -105,16 +105,15 @@ for (l = systray.list_icons; l ; l = l->next) {

traywin = (TrayWindow*)l->data; // watch for the icon trying to resize itself! - XSelectInput(server.dsp, traywin->id, StructureNotifyMask|ResizeRedirectMask); + //XSelectInput(server.dsp, traywin->id, StructureNotifyMask|ResizeRedirectMask); + XSelectInput(server.dsp, traywin->id, StructureNotifyMask); // position and size the icon window XMoveResizeWindow(server.dsp, traywin->id, traywin->x, traywin->y, icon_size, icon_size); + //printf("icon %d, %d, %d\n", traywin->x, traywin->y, icon_size); // ceci intervertie les fonds : le premier icone prend le fond du dernier // le dernier prend le fond de l'avant dernier, ... XSetWindowBackgroundPixmap (server.dsp, panel->main_win, systray.area.pix.pmap); - - // resize our window so that the new window can fit in it - //fix_geometry(); // flush before clearing, otherwise the clear isn't effective. XFlush(server.dsp);

@@ -158,6 +157,8 @@ traywin = (TrayWindow*)l->data;

traywin->y = posy; traywin->x = posx; + traywin->width = icon_size; + traywin->height = icon_size; posx += (icon_size + systray.area.paddingx); }

@@ -260,7 +261,7 @@ d=d;e=e;

if (e->error_code == BadWindow) { error = TRUE; } else { - //g_printerr("X ERROR NOT BAD WINDOW!\n"); + printf("error_handler %d\n", e->error_code); abort(); } return 0;
M src/tint.csrc/tint.c

@@ -457,25 +457,6 @@ panel = get_panel(e->xany.window);

if (!panel) return; // TODO : one panel_refresh per panel ? panel_refresh = 1; -/* - if (systray.area.on_screen) { - // force trayer refresh - //XClearWindow(tray_data.dpy, ti->mid_parent); - //x11_send_visibility(tray_data.dpy, dst, VisibilityFullyObscured); - //x11_send_visibility(tray_data.dpy, dst, VisibilityUnobscured); - - GSList *l; - TrayWindow *traywin; - for (l = systray.list_icons; l ; l = l->next) { - traywin = (TrayWindow*)l->data; - // send Expose event - XClearArea(server.dsp, traywin->id, 0, 0, systray.area.width, systray.area.height, True); - //printf("expose %lx\n", traywin->id); - } - - //x11_refresh_window(tray_data.dpy, ti->wid, ti->l.wnd_sz.x, ti->l.wnd_sz.y, True); - } -*/ }

@@ -487,8 +468,10 @@ GSList *l;

for (l = systray.list_icons; l ; l = l->next) { traywin = (TrayWindow*)l->data; if (traywin->id == win) { - XMoveResizeWindow(server.dsp, traywin->id, traywin->x, traywin->y, traywin->width, traywin->height); - return; + //printf("move tray %d\n", traywin->x); + XMoveResizeWindow(server.dsp, traywin->id, traywin->x, traywin->y, traywin->width, traywin->height); + panel_refresh = 1; + return; } }