panel_items : fixed _NET_WM_ICON_GEOMETRY. panel_items is done for me. git-svn-id: http://tint2.googlecode.com/svn/trunk@563 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
5 files changed,
11 insertions(+),
6 deletions(-)
M
src/server.c
→
src/server.c
@@ -38,6 +38,7 @@ {
server.atom._XROOTPMAP_ID = XInternAtom (server.dsp, "_XROOTPMAP_ID", False); server.atom._NET_CURRENT_DESKTOP = XInternAtom (server.dsp, "_NET_CURRENT_DESKTOP", False); server.atom._NET_NUMBER_OF_DESKTOPS = XInternAtom (server.dsp, "_NET_NUMBER_OF_DESKTOPS", False); + server.atom._NET_DESKTOP_NAMES = XInternAtom (server.dsp, "_NET_DESKTOP_NAMES", False); server.atom._NET_DESKTOP_GEOMETRY = XInternAtom (server.dsp, "_NET_DESKTOP_GEOMETRY", False); server.atom._NET_DESKTOP_VIEWPORT = XInternAtom (server.dsp, "_NET_DESKTOP_VIEWPORT", False); server.atom._NET_ACTIVE_WINDOW = XInternAtom (server.dsp, "_NET_ACTIVE_WINDOW", False);
M
src/server.h
→
src/server.h
@@ -19,6 +19,7 @@ {
Atom _XROOTPMAP_ID; Atom _NET_CURRENT_DESKTOP; Atom _NET_NUMBER_OF_DESKTOPS; + Atom _NET_DESKTOP_NAMES; Atom _NET_DESKTOP_GEOMETRY; Atom _NET_DESKTOP_VIEWPORT; Atom _NET_ACTIVE_WINDOW;
M
src/taskbar/task.c
→
src/taskbar/task.c
@@ -344,6 +344,9 @@ int width=0, height;
Panel *panel = (Panel*)tsk->area.panel; //printf("draw_task %d %d\n", tsk->area.posx, tsk->area.posy); + long value[] = { panel->posx+tsk->area.posx, panel->posy+tsk->area.posy, tsk->area.width, tsk->area.height }; + XChangeProperty (server.dsp, tsk->win, server.atom._NET_WM_ICON_GEOMETRY, XA_CARDINAL, 32, PropModeReplace, (unsigned char*)value, 4); + if (panel->g_task.text) { /* Layout */ layout = pango_cairo_create_layout (c);
M
src/taskbar/taskbar.c
→
src/taskbar/taskbar.c
@@ -266,6 +266,7 @@ Task *tsk;
GSList *l; int task_count, border_width; + //printf("resize_taskbar %d %d\n", taskbar->area.posx, taskbar->area.posy); // taskbar->area.redraw = 1; border_width = taskbar->area.bg->border.width;@@ -297,9 +298,6 @@ tsk = l->data;
if (!tsk->area.on_screen) continue; //set_task_redraw(tsk); // always redraw task, because the background could have changed (taskbar_active_id) tsk->area.width = pixel_width; -// TODO : move later (when posx is known) -// long value[] = { panel->posx+x, panel->posy, pixel_width, panel->area.height }; -// XChangeProperty (server.dsp, tsk->win, server.atom._NET_WM_ICON_GEOMETRY, XA_CARDINAL, 32, PropModeReplace, (unsigned char*)value, 4); if (modulo_width) { tsk->area.width++;@@ -335,9 +333,6 @@ tsk = l->data;
if (!tsk->area.on_screen) continue; //set_task_redraw(tsk); // always redraw task, because the background could have changed (taskbar_active_id) tsk->area.height = pixel_height; -// TODO : move later (when posy is known) -// long value[] = { panel->posx, panel->posy+y, panel->area.width, pixel_height }; -// XChangeProperty (server.dsp, tsk->win, server.atom._NET_WM_ICON_GEOMETRY, XA_CARDINAL, 32, PropModeReplace, (unsigned char*)value, 4); if (modulo_height) { tsk->area.height++;
M
src/tint.c
→
src/tint.c
@@ -485,6 +485,11 @@ XSelectInput (server.dsp, server.root_win, PropertyChangeMask|StructureNotifyMask);
server.got_root_win = 1; } + // Change name of desktops + else if (at == server.atom._NET_DESKTOP_NAMES) { + printf("_NET_DESKTOP_NAMES\n"); + panel_refresh = 1; + } // Change number of desktops else if (at == server.atom._NET_NUMBER_OF_DESKTOPS) { if (!taskbar_enabled) return;