]> Dogcows Code - chaz/tint2/commitdiff
revert r78, fixed issue 100
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Sun, 14 Jun 2009 19:07:58 +0000 (19:07 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Sun, 14 Jun 2009 19:07:58 +0000 (19:07 +0000)
ChangeLog
src/systray/systraybar.c
src/tint.c

index 0c52f2fbbdb7f710fe23d824080cc782227f190e..92a0d3d6b2329232a2f02de975ffe90fbb6c957a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2009-06-14
+- revert r78, fixed issue 100
+
 2009-06-13
 - fixed background refresh on systray
 
index ed94ac63c9af3febe30f7e14b6f079d96dd0d59f..49f0253ed626872bc5b0ebaaa38db083aee07fd0 100644 (file)
@@ -105,17 +105,16 @@ void draw_systray(void *obj, cairo_t *c, int active)
                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);
                // make sure the new child will get the right stuff in its background
@@ -158,6 +157,8 @@ void resize_systray(void *obj)
 
                traywin->y = posy;
                traywin->x = posx;
+               traywin->width = icon_size;
+               traywin->height = icon_size;
                posx += (icon_size + systray.area.paddingx);
        }
 
@@ -260,7 +261,7 @@ int window_error_handler(Display *d, XErrorEvent *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;
index 2f95994c6e238bd00c09158ea580dc060e3083e1..5c93aaaf2e1ab3bd4adb7f3a6c96c02494212ad7 100644 (file)
@@ -457,25 +457,6 @@ void event_expose (XEvent *e)
        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 @@ void event_configure_notify (Window win)
        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;
                }
        }
 
This page took 0.030537 seconds and 4 git commands to generate.