]> Dogcows Code - chaz/tint2/commitdiff
panel_items : fixed _NET_WM_ICON_GEOMETRY. panel_items is done for me.
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Thu, 23 Sep 2010 20:28:30 +0000 (20:28 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Thu, 23 Sep 2010 20:28:30 +0000 (20:28 +0000)
src/server.c
src/server.h
src/taskbar/task.c
src/taskbar/taskbar.c
src/tint.c

index 862e559638455bcbaad0546106a2af214e1ed5af..053b41f29d43fe287526c7631cb022451decf90b 100644 (file)
@@ -38,6 +38,7 @@ void server_init_atoms ()
        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);
index 8237a39b199faf22abbe69598772483d835d6dc3..0ee6ea523f3a9ba834183579fe406834e97ede13 100644 (file)
@@ -19,6 +19,7 @@ typedef struct Global_atom
        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;
index 83e827f5247ef181e1df0e51e5c95186f0c8b823..b132ae68e69e0a36666e59c0eb230c858af8af9f 100644 (file)
@@ -344,6 +344,9 @@ void draw_task (void *obj, cairo_t *c)
        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);
index 6901fccabb134ceeef8f303ec4f45f1f239c32bb..45388921c2b96392a951d5221e315171aa723528 100644 (file)
@@ -266,6 +266,7 @@ int resize_taskbar(void *obj)
        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 @@ int resize_taskbar(void *obj)
                        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 @@ int resize_taskbar(void *obj)
                        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++;
index 2f5edc6f0991cf429611982a31808646399dbca9..22f67da01d76b7ea5cc4aff2914d976ed646fa06 100644 (file)
@@ -485,6 +485,11 @@ void event_property_notify (XEvent *e)
                        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;
This page took 0.027293 seconds and 4 git commands to generate.