]> Dogcows Code - chaz/tint2/blobdiff - src/tint.c
add another padding parameter in config file, update documentation and sample config...
[chaz/tint2] / src / tint.c
index a85771dd8875170b01548167700b3762a9a63865..9ff04fc2cf5363dab6764ba059498eb4b27ddb6d 100644 (file)
@@ -364,23 +364,7 @@ void event_property_notify (Window win, Atom at)
       }
       /* Window desktop changed */
       else if (at == server.atom._NET_WM_DESKTOP) {
-         Window win2 = tsk->win;
-         if (tsk->all_desktop) {
-            Task *tsk2;
-            GSList *l0;
-            int i, nb;
-            nb = server.nb_desktop * server.nb_monitor;
-            for (i=0 ; i < nb ; i++) {
-               for (l0 = panel.taskbar[i].area.list; l0 ; ) {
-                  tsk2 = l0->data;
-                  l0 = l0->next;
-                  if (win2 == tsk2->win)
-                     remove_task (tsk2);
-               }
-            }
-         }
-         else
-            remove_task (tsk);
+         remove_task (tsk);
          add_task (win);
          panel.refresh = 1;
       }
@@ -392,16 +376,16 @@ void event_property_notify (Window win, Atom at)
 
 void event_configure_notify (Window win)
 {
-   Task *tsk;
+   if (panel.mode != MULTI_MONITOR) return;
 
-   tsk = task_get_task (win);
+   Task *tsk = task_get_task (win);
    if (!tsk) return;
 
    Taskbar *tskbar = tsk->area.parent;
    if (tskbar->monitor != window_get_monitor (win)) {
       // task on another monitor
-      add_task (tsk->win);
       remove_task (tsk);
+      add_task (win);
       panel.refresh = 1;
    }
 }
@@ -487,7 +471,7 @@ load_config:
 
                case Expose:
                   XCopyArea (server.dsp, panel.area.pix.pmap, server.root_win, server.gc_root, 0, 0, panel.area.width, panel.area.height, server.posx, server.posy);
-                  XCopyArea (server.dsp, server.pmap, window.main_win, server.gc, panel.area.paddingx, 0, panel.area.width-(2*panel.area.paddingx), panel.area.height, 0, 0);
+                  XCopyArea (server.dsp, server.pmap, window.main_win, server.gc, panel.area.paddingxlr, 0, panel.area.width-(2*panel.area.paddingxlr), panel.area.height, 0, 0);
                   break;
 
                case PropertyNotify:
@@ -499,8 +483,7 @@ load_config:
                   if (e.xconfigure.window == server.root_win)
                      goto load_config;
                   else
-                     if (panel.mode == MULTI_MONITOR)
-                        event_configure_notify (e.xconfigure.window);
+                     event_configure_notify (e.xconfigure.window);
                   break;
             }
          }
This page took 0.022789 seconds and 4 git commands to generate.