80 cols and remove some unused mwm defines
authorMikael Magnusson <mikachu@comhem.se>
Thu, 7 Jun 2007 18:38:41 +0000 (18:38 +0000)
committerMikael Magnusson <mikachu@comhem.se>
Thu, 7 Jun 2007 18:38:41 +0000 (18:38 +0000)
gui.c
gui.h
rspanel.c
rspanel.h
xprop.c
xprop.h

diff --git a/gui.c b/gui.c
index be7b4b6..820dbd4 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -47,7 +47,8 @@ void gui_init(screen *sc)
     sc->fore_gc = XCreateGC(sc->dd, sc->root, GCGraphicsExposures, &gcv);
 
     /* We don't allow different fonts for various window states... */
-    font = RrFontOpen(sc->rr, "Candara, sans", 10, RR_FONTWEIGHT_NORMAL, RR_FONTSLANT_NORMAL);
+    font = RrFontOpen(sc->rr, "Candara, sans", 10,
+                      RR_FONTWEIGHT_NORMAL, RR_FONTSLANT_NORMAL);
 
     /* this appearance will be used to draw icons */
     a_icon = RrAppearanceNew(sc->rr, 1);
@@ -249,7 +250,8 @@ void gui_draw_taskbar(screen *sc, taskbar *tb)
     tb->bg = XCreatePixmap(sc->dd, sc->root, tb->w, tb->h, RrDepth(sc->rr));
 
     XFreePixmap(sc->dd, RrPaintPixmap(background, tb->w, tb->h));
-    XCopyArea(sc->dd, background->pixmap, tb->bg, sc->fore_gc, 0, 0, tb->w, tb->h, 0, 0);
+    XCopyArea(sc->dd, background->pixmap, tb->bg, sc->fore_gc, 0, 0,
+              tb->w, tb->h, 0, 0);
 
     /* find the number of visible tasks */
     for (tk = tb->task_list; tk; tk = tk->next) {
diff --git a/gui.h b/gui.h
index 8e44cfd..82e54a0 100644 (file)
--- a/gui.h
+++ b/gui.h
@@ -13,6 +13,7 @@ void gui_init(struct screen *sc);
 void gui_create_taskbar(struct screen *sc, struct taskbar *tb);
 
 void gui_draw_taskbar(struct screen *sc, struct taskbar *tb);
-void gui_draw_task(struct screen *sc, struct taskbar *tb, struct task *tk, int redraw);
+void gui_draw_task(struct screen *sc, struct taskbar *tb,
+                   struct task *tk, int redraw);
 
 #endif
index b6420e7..d4caec3 100644 (file)
--- a/rspanel.c
+++ b/rspanel.c
@@ -380,28 +380,35 @@ static void handle_press(int x, int y, int button, Time time)
                     break;
                 case 2:
                     if (tk->iconified)
-                        netwm_action(tk->win, _NET_WM_STATE_HIDDEN, time, XPROP_REMOVE);
+                        netwm_action(tk->win, _NET_WM_STATE_HIDDEN,
+                                     time, XPROP_REMOVE);
                     else
-                        netwm_action(tk->win, _NET_WM_STATE_HIDDEN, time, XPROP_ADD);
+                        netwm_action(tk->win, _NET_WM_STATE_HIDDEN,
+                                     time, XPROP_ADD);
                     break;
                 case 3:
                     netwm_action(tk->win, _NET_RESTACK_WINDOW, time, Opposite);
                     break;
                 case 4:
                     if (is_shaded(tk->win))
-                            netwm_action(tk->win, _NET_RESTACK_WINDOW, time, Below);
+                            netwm_action(tk->win, _NET_RESTACK_WINDOW,
+                                         time, Below);
                     else
-                            netwm_action(tk->win, _NET_WM_STATE_SHADED, time, XPROP_ADD);
+                            netwm_action(tk->win, _NET_WM_STATE_SHADED,
+                                         time, XPROP_ADD);
                     break;
                 case 5:
                     if (is_shaded(tk->win))
-                        netwm_action(tk->win, _NET_WM_STATE_SHADED, time, XPROP_REMOVE);
+                        netwm_action(tk->win, _NET_WM_STATE_SHADED,
+                                     time, XPROP_REMOVE);
                     else
-                            netwm_action(tk->win, _NET_RESTACK_WINDOW, time, Above);
+                            netwm_action(tk->win, _NET_RESTACK_WINDOW,
+                                         time, Above);
                     break;
                 case 9:
                     if (tk->iconified)
-                        netwm_action(tk->win, _NET_WM_STATE_HIDDEN, time, XPROP_REMOVE);
+                        netwm_action(tk->win, _NET_WM_STATE_HIDDEN,
+                                     time, XPROP_REMOVE);
                     else
                         netwm_action(tk->win, _OB_FOCUS, 0, 0);
                     break;
@@ -475,18 +482,22 @@ static void handle_propertynotify(Window win, Atom at)
         /* XXX only redraw the task that got focused/unfocused
          * when _NET_ACTIVE_WINDOW triggers this,
          * redraw everything if that task was hidden before though */
-        if (at == sc.atoms[_NET_CLIENT_LIST] || at == sc.atoms[_NET_CURRENT_DESKTOP] ||
-            at == sc.atoms[_NET_ACTIVE_WINDOW])
+        if (at == sc.atoms[_NET_CLIENT_LIST]
+            || at == sc.atoms[_NET_CURRENT_DESKTOP]
+            || at == sc.atoms[_NET_ACTIVE_WINDOW])
         {
             XEvent ce;
             Atom check;
 
             check = sc.atoms[_NET_CLIENT_LIST];
-            while (XCheckIfEvent(sc.dd, &ce, look_for_duplicate_property, (XPointer)&check));
+            while (XCheckIfEvent(sc.dd, &ce, look_for_duplicate_property,
+                                 (XPointer)&check));
             check = sc.atoms[_NET_CURRENT_DESKTOP];
-            while (XCheckIfEvent(sc.dd, &ce, look_for_duplicate_property, (XPointer)&check));
+            while (XCheckIfEvent(sc.dd, &ce, look_for_duplicate_property,
+                                 (XPointer)&check));
             check = sc.atoms[_NET_ACTIVE_WINDOW];
-            while (XCheckIfEvent(sc.dd, &ce, look_for_duplicate_property, (XPointer)&check));
+            while (XCheckIfEvent(sc.dd, &ce, look_for_duplicate_property,
+                                 (XPointer)&check));
 
             taskbar_read_clientlist();
             gui_draw_taskbar(&sc, &tb);
@@ -593,7 +604,8 @@ main(int argc, char *argv[])
             XNextEvent(sc.dd, &ev);
             switch (ev.type) {
             case ButtonPress:
-                handle_press(ev.xbutton.x, ev.xbutton.y, ev.xbutton.button, ev.xbutton.time);
+                handle_press(ev.xbutton.x, ev.xbutton.y,
+                             ev.xbutton.button, ev.xbutton.time);
                 break;
             case PropertyNotify:
                 handle_propertynotify(ev.xproperty.window, ev.xproperty.atom);
index 509c897..3afe008 100644 (file)
--- a/rspanel.h
+++ b/rspanel.h
@@ -57,35 +57,6 @@ typedef struct taskbar
 }
 taskbar;
 
-#define MWM_HINTS_DECORATIONS         (1L << 1)
-typedef struct _mwmhints
-{
-       unsigned long flags;
-       unsigned long functions;
-       unsigned long decorations;
-       long inputMode;
-       unsigned long status;
-}
-MWMHints;
-
-#define WIN_STATE_STICKY          (1<<0)       /* everyone knows sticky */
-#define WIN_STATE_MINIMIZED       (1<<1)       /* ??? */
-#define WIN_STATE_MAXIMIZED_VERT  (1<<2)       /* window in maximized V state */
-#define WIN_STATE_MAXIMIZED_HORIZ (1<<3)       /* window in maximized H state */
-#define WIN_STATE_HIDDEN          (1<<4)       /* not on taskbar but window visible */
-#define WIN_STATE_SHADED          (1<<5)       /* shaded (NeXT style) */
-#define WIN_STATE_HID_WORKSPACE   (1<<6)       /* not on current desktop */
-#define WIN_STATE_HID_TRANSIENT   (1<<7)       /* owner of transient is hidden */
-#define WIN_STATE_FIXED_POSITION  (1<<8)       /* window is fixed in position even */
-#define WIN_STATE_ARRANGE_IGNORE  (1<<9)       /* ignore for auto arranging */
-
-#define WIN_HINTS_SKIP_FOCUS      (1<<0)       /* "alt-tab" skips this win */
-#define WIN_HINTS_SKIP_WINLIST    (1<<1)       /* not in win list */
-#define WIN_HINTS_SKIP_TASKBAR    (1<<2)       /* not on taskbar */
-#define WIN_HINTS_GROUP_TRANSIENT (1<<3)       /* ??????? */
-#define WIN_HINTS_FOCUS_ON_CLICK  (1<<4)       /* app only accepts focus when clicked */
-#define WIN_HINTS_DO_NOT_COVER    (1<<5)       /* attempt to not cover this window */
-
 int task_shown(task *tk);
 
 #endif
diff --git a/xprop.c b/xprop.c
index de35a9a..60416df 100644 (file)
--- a/xprop.c
+++ b/xprop.c
@@ -38,7 +38,8 @@ void xprop_init(screen *sc)
     XInternAtoms(sc->dd, xprop_names, XPROP_COUNT, False, sc->atoms);
 }
 
-void* xprop_get_data(screen *sc, Window win, xprop_t prop, Atom type, int *items)
+void* xprop_get_data(screen *sc, Window win, xprop_t prop,
+                     Atom type, int *items)
 {
     Atom type_ret;
     int format_ret;
@@ -48,8 +49,9 @@ void* xprop_get_data(screen *sc, Window win, xprop_t prop, Atom type, int *items
 
     prop_data = 0;
 
-    XGetWindowProperty(sc->dd, win, sc->atoms[prop], 0, 0x7fffffff, False, type, &type_ret,
-                       &format_ret, &items_ret, &after_ret, &prop_data);
+    XGetWindowProperty(sc->dd, win, sc->atoms[prop], 0, 0x7fffffff,
+                       False, type, &type_ret, &format_ret, &items_ret,
+                       &after_ret, &prop_data);
     if (items)
         *items = items_ret;
 
@@ -91,7 +93,8 @@ void xprop_set_atom(screen *sc, Window win, xprop_t p, xprop_t at)
                     PropModeReplace, (unsigned char *)&sc->atoms[at], 1);
 }
 
-void xprop_set_array(screen *sc, Window win, xprop_t p, const long *vals, int num)
+void xprop_set_array(screen *sc, Window win, xprop_t p,
+                     const long *vals, int num)
 {
     XChangeProperty(sc->dd, win, sc->atoms[p], XA_CARDINAL, 32, PropModeReplace,
                     (unsigned char *)vals, num);
diff --git a/xprop.h b/xprop.h
index a7d9c7f..92e7488 100644 (file)
--- a/xprop.h
+++ b/xprop.h
@@ -47,7 +47,8 @@ enum {
 
 void  xprop_init(struct screen *sc);
 
-void* xprop_get_data(struct screen *sc, Window win, xprop_t prop, Atom type, int *items);
+void* xprop_get_data(struct screen *sc, Window win, xprop_t prop,
+                     Atom type, int *items);
 
 int   xprop_get_num(struct screen *sc, Window win, xprop_t p);
 char* xprop_get_utf8(struct screen *sc, Window win, xprop_t p);
@@ -56,7 +57,8 @@ char* xprop_get_string(struct screen *sc, Window win, xprop_t p);
 void xprop_set_num(struct screen *sc, Window win, xprop_t p, long val);
 void xprop_set_atom(struct screen *sc, Window win, xprop_t p, xprop_t at);
 
-void xprop_set_array(struct screen *sc, Window win, xprop_t p, const long *vals, int num);
+void xprop_set_array(struct screen *sc, Window win, xprop_t p,
+                     const long *vals, int num);
 
 void xprop_set_string(struct screen *sc, Window win, xprop_t p, const char *s);