]> Dogcows Code - chaz/openbox/commitdiff
80 cols
authorMikael Magnusson <mikachu@comhem.se>
Wed, 15 Nov 2006 21:12:06 +0000 (21:12 +0000)
committerMikael Magnusson <mikachu@comhem.se>
Wed, 15 Nov 2006 21:12:06 +0000 (21:12 +0000)
12 files changed:
openbox/action.c
openbox/client.c
openbox/client_list_menu.c
openbox/event.c
openbox/frame.c
openbox/place.c
openbox/popup.c
openbox/screen.c
openbox/stacking.c
openbox/startupnotify.c
render/image.c
render/render.c

index 24a0c6346396d39c45de365b372b106e008af1c6..9350c3ce6bc6c0cd9db6300dc7f54c8d06479fd3 100644 (file)
@@ -1606,19 +1606,23 @@ void action_movetoedge(union ActionData *data)
     
     switch(data->diraction.direction) {
     case OB_DIRECTION_NORTH:
-        y = client_directional_edge_search(c, OB_DIRECTION_NORTH, data->diraction.hang)
+        y = client_directional_edge_search(c, OB_DIRECTION_NORTH,
+                                           data->diraction.hang)
             - (data->diraction.hang ? c->frame->area.height : 0);
         break;
     case OB_DIRECTION_WEST:
-        x = client_directional_edge_search(c, OB_DIRECTION_WEST, data->diraction.hang)
+        x = client_directional_edge_search(c, OB_DIRECTION_WEST,
+                                           data->diraction.hang)
             - (data->diraction.hang ? c->frame->area.width : 0);
         break;
     case OB_DIRECTION_SOUTH:
-        y = client_directional_edge_search(c, OB_DIRECTION_SOUTH, data->diraction.hang)
+        y = client_directional_edge_search(c, OB_DIRECTION_SOUTH,
+                                           data->diraction.hang)
             - (data->diraction.hang ? 0 : c->frame->area.height);
         break;
     case OB_DIRECTION_EAST:
-        x = client_directional_edge_search(c, OB_DIRECTION_EAST, data->diraction.hang)
+        x = client_directional_edge_search(c, OB_DIRECTION_EAST,
+                                           data->diraction.hang)
             - (data->diraction.hang ? 0 : c->frame->area.width);
         break;
     default:
index e4483e1f1a6769c21f7df302dccfaf12b0800af6..88eecf1443db161f79d076aca4ddcd6262fe7bce 100644 (file)
@@ -218,10 +218,11 @@ static ObAppSettings *get_settings(ObClient *client)
                 && !strcmp(app->name, client->name))
             ) {
             ob_debug("Window matching: %s\n", app->name);
-            /* Match if no role was specified in the per app setting, or if the string
-             * matches the beginning of the role, since apps like to set the role to
-             * things like browser-window-23c4b2f */
-            if (!app->role || !strncmp(app->role, client->role, strlen(app->role)))
+            /* Match if no role was specified in the per app setting, or if the
+             * string matches the beginning of the role, since apps like to set
+             * the role to things like browser-window-23c4b2f */
+            if (!app->role
+                || !strncmp(app->role, client->role, strlen(app->role)))
                 return app;
         }
 
@@ -3274,7 +3275,8 @@ gint client_directional_edge_search(ObClient *c, ObDirection dir, gboolean hang)
 
             his_edge_start = cur->frame->area.x;
             his_edge_end = cur->frame->area.x + cur->frame->area.width;
-            his_offset = cur->frame->area.y + (hang ? 0 : cur->frame->area.height);
+            his_offset = cur->frame->area.y + 
+                         (hang ? 0 : cur->frame->area.height);
 
             if(his_offset + 1 > my_offset)
                 continue;
@@ -3292,7 +3294,8 @@ gint client_directional_edge_search(ObClient *c, ObDirection dir, gboolean hang)
 
         /* default: bottom of screen */
         dest = a->y + a->height - (hang ? c->frame->area.height : 0);
-        monitor_dest = monitor->y + monitor->height - (hang ? c->frame->area.height : 0);
+        monitor_dest = monitor->y + monitor->height -
+                       (hang ? c->frame->area.height : 0);
         /* if the monitor edge comes before the screen edge, */
         /* use that as the destination instead. (For xinerama) */
         if (monitor_dest != dest && my_offset < monitor_dest)
@@ -3306,7 +3309,8 @@ gint client_directional_edge_search(ObClient *c, ObDirection dir, gboolean hang)
 
             his_edge_start = cur->frame->area.x;
             his_edge_end = cur->frame->area.x + cur->frame->area.width;
-            his_offset = cur->frame->area.y + (hang ? cur->frame->area.height : 0);
+            his_offset = cur->frame->area.y +
+                         (hang ? cur->frame->area.height : 0);
 
 
             if(his_offset - 1 < my_offset)
@@ -3339,7 +3343,8 @@ gint client_directional_edge_search(ObClient *c, ObDirection dir, gboolean hang)
 
             his_edge_start = cur->frame->area.y;
             his_edge_end = cur->frame->area.y + cur->frame->area.height;
-            his_offset = cur->frame->area.x + (hang ? 0 : cur->frame->area.width);
+            his_offset = cur->frame->area.x +
+                         (hang ? 0 : cur->frame->area.width);
 
             if(his_offset + 1 > my_offset)
                 continue;
@@ -3357,7 +3362,8 @@ gint client_directional_edge_search(ObClient *c, ObDirection dir, gboolean hang)
         
         /* default: rightmost edge of screen */
         dest = a->x + a->width - (hang ? c->frame->area.width : 0);
-        monitor_dest = monitor->x + monitor->width - (hang ? c->frame->area.width : 0);
+        monitor_dest = monitor->x + monitor->width -
+                       (hang ? c->frame->area.width : 0);
         /* if the monitor edge comes before the screen edge, */
         /* use that as the destination instead. (For xinerama) */
         if (monitor_dest != dest && my_offset < monitor_dest)
@@ -3371,7 +3377,8 @@ gint client_directional_edge_search(ObClient *c, ObDirection dir, gboolean hang)
 
             his_edge_start = cur->frame->area.y;
             his_edge_end = cur->frame->area.y + cur->frame->area.height;
-            his_offset = cur->frame->area.x + (hang ? cur->frame->area.width : 0);
+            his_offset = cur->frame->area.x +
+                         (hang ? cur->frame->area.width : 0);
 
             if(his_offset - 1 < my_offset)
                 continue;
index 9f4e786e07cc4ae723696dc3529ef27fe2f2c0af..569269a37a9c7f33e527a52dd8ba32fde49d6a49 100644 (file)
@@ -75,7 +75,8 @@ static void desk_menu_update(ObMenuFrame *frame, gpointer data)
             e = menu_add_normal(menu, i,
                                 (c->iconic ? c->icon_title : c->title), acts);
 
-            if (config_menu_client_list_icons && (icon = client_icon(c, 32, 32))) {
+            if (config_menu_client_list_icons
+                && (icon = client_icon(c, 32, 32))) {
                 e->data.normal.icon_width = icon->width;
                 e->data.normal.icon_height = icon->height;
                 e->data.normal.icon_data = icon->data;
index 2c13ceda2617088903d5829987d0f4355e90f299..21185be984300df8a80189fa7de2d28e7ddd72f2 100644 (file)
@@ -1287,7 +1287,8 @@ static gboolean focus_delay_func(gpointer data)
 
 static void focus_delay_client_dest(ObClient *client, gpointer data)
 {
-    ob_main_loop_timeout_remove_data(ob_main_loop, focus_delay_func, client, TRUE);
+    ob_main_loop_timeout_remove_data(ob_main_loop, focus_delay_func,
+                                     client, TRUE);
 }
 
 static void event_client_dest(ObClient *client, gpointer data)
index 6c06697a4ae61b90b18981f7cfcaa45c1efb9c2b..2c1152ee0f3f1ee4b9614fd5a30abdb4eefa2ead 100644 (file)
@@ -581,7 +581,8 @@ static void layout_title(ObFrame *self)
             break;
         case 'D':
             if (d) { *lc = ' '; break; }
-            if (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) && config_theme_hidedisabled)
+            if (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS)
+                && config_theme_hidedisabled)
                 break;
             d = TRUE;
             self->label_width -= (ob_rr_theme->button_size +
@@ -589,7 +590,8 @@ static void layout_title(ObFrame *self)
             break;
         case 'S':
             if (s) { *lc = ' '; break; }
-            if (!(self->decorations & OB_FRAME_DECOR_SHADE) && config_theme_hidedisabled)
+            if (!(self->decorations & OB_FRAME_DECOR_SHADE)
+                && config_theme_hidedisabled)
                 break;
             s = TRUE;
             self->label_width -= (ob_rr_theme->button_size +
@@ -597,7 +599,8 @@ static void layout_title(ObFrame *self)
             break;
         case 'I':
             if (i) { *lc = ' '; break; }
-            if (!(self->decorations & OB_FRAME_DECOR_ICONIFY) && config_theme_hidedisabled)
+            if (!(self->decorations & OB_FRAME_DECOR_ICONIFY)
+                && config_theme_hidedisabled)
                 break;
             i = TRUE;
             self->label_width -= (ob_rr_theme->button_size +
@@ -609,7 +612,8 @@ static void layout_title(ObFrame *self)
             break;
         case 'M':
             if (m) { *lc = ' '; break; }
-            if (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) && config_theme_hidedisabled)
+            if (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE)
+                && config_theme_hidedisabled)
                 break;
             m = TRUE;
             self->label_width -= (ob_rr_theme->button_size +
@@ -617,7 +621,8 @@ static void layout_title(ObFrame *self)
             break;
         case 'C':
             if (c) { *lc = ' '; break; }
-            if (!(self->decorations & OB_FRAME_DECOR_CLOSE) && config_theme_hidedisabled)
+            if (!(self->decorations & OB_FRAME_DECOR_CLOSE)
+                && config_theme_hidedisabled)
                 break;
             c = TRUE;
             self->label_width -= (ob_rr_theme->button_size +
index 071e44be0ca163551f65197a3f6efd0c3e93365e..a4c2f588659067260c8ebaa2312028a05fbc66e3 100644 (file)
@@ -334,7 +334,8 @@ static gboolean place_under_mouse(ObClient *client, gint *x, gint *y)
     return TRUE;
 }
 
-static gboolean place_per_app_setting(ObClient *client, gint *x, gint *y, ObAppSettings *settings)
+static gboolean place_per_app_setting(ObClient *client, gint *x, gint *y,
+                                      ObAppSettings *settings)
 {
     gint px, py, i;
     Rect *screen;
@@ -414,7 +415,8 @@ static gboolean place_transient(ObClient *client, gint *x, gint *y)
 }
 
 /* Return TRUE if we want client.c to enforce on-screen-keeping */
-gboolean place_client(ObClient *client, gint *x, gint *y, ObAppSettings *settings)
+gboolean place_client(ObClient *client, gint *x, gint *y,
+                      ObAppSettings *settings)
 {
     gboolean ret = FALSE;
     if (client->positioned)
index e975294dfd59ba7574ebafaa2ed94c245955374f..4a0ae89075fa7c3a81330bb8a0bd6622c3dbe78b 100644 (file)
@@ -319,7 +319,8 @@ static void pager_popup_draw_icon(gint px, gint py, gint w, gint h,
             vert_inc = -screen_desktop_layout.columns;
             break;
         case OB_CORNER_BOTTOMLEFT:
-            n = (screen_desktop_layout.rows - 1) * screen_desktop_layout.columns;
+            n = (screen_desktop_layout.rows - 1)
+                * screen_desktop_layout.columns;
             horz_inc = 1;
             vert_inc = -screen_desktop_layout.columns;
             break;
@@ -335,7 +336,8 @@ static void pager_popup_draw_icon(gint px, gint py, gint w, gint h,
             vert_inc = 1;
             break;
         case OB_CORNER_TOPRIGHT:
-            n = screen_desktop_layout.rows * (screen_desktop_layout.columns - 1);
+            n = screen_desktop_layout.rows
+                * (screen_desktop_layout.columns - 1);
             horz_inc = -screen_desktop_layout.rows;
             vert_inc = 1;
             break;
index eb2e487745ff5317d94b309707a6c8727460f435..b3bd54accf04339854b087c937f0bde45d68a73c 100644 (file)
@@ -296,7 +296,8 @@ void screen_startup(gboolean reconfig)
         screen_num_desktops = 0;
     screen_set_num_desktops(config_desktops_num);
     if (!reconfig) {
-        screen_set_desktop(MIN(config_screen_firstdesk, screen_num_desktops) - 1);
+        screen_set_desktop(MIN(config_screen_firstdesk, screen_num_desktops)
+                           - 1);
 
         /* don't start in showing-desktop mode */
         screen_showing_desktop = FALSE;
index d063cfa22aff0a427347a45e7363d1009ee3ec24..29b3d1a9b064a65679668b90e4f46da6df201114 100644 (file)
@@ -284,7 +284,8 @@ void stacking_raise(ObWindow *window, gboolean group)
         selected = WINDOW_AS_CLIENT(window);
         c = client_search_top_transient(selected);
         wins = pick_windows(c, selected, TRUE);
-        wins = g_list_concat(wins, pick_group_windows(c, selected, TRUE, group));
+        wins = g_list_concat(wins,
+                             pick_group_windows(c, selected, TRUE, group));
     } else {
         wins = g_list_append(NULL, window);
         stacking_list = g_list_remove(stacking_list, window);
@@ -303,7 +304,8 @@ void stacking_lower(ObWindow *window, gboolean group)
         selected = WINDOW_AS_CLIENT(window);
         c = client_search_top_transient(selected);
         wins = pick_windows(c, selected, FALSE);
-        wins = g_list_concat(pick_group_windows(c, selected, FALSE, group), wins);
+        wins = g_list_concat(pick_group_windows(c, selected, FALSE, group),
+                             wins);
     } else {
         wins = g_list_append(NULL, window);
         stacking_list = g_list_remove(stacking_list, window);
index e32144c0a896b4f7139aa23876e17f9658b74e5f..66258c821869d750cabd7f7d03008980cac593d8 100644 (file)
@@ -177,7 +177,8 @@ static void sn_event_func(SnMonitorEvent *ev, gpointer data)
     case SN_MONITOR_EVENT_CANCELED:
         if ((d = wait_find(sn_startup_sequence_get_id(seq)))) {
             d->feedback = FALSE;
-            ob_main_loop_timeout_remove_data(ob_main_loop, sn_wait_timeout, d, FALSE);
+            ob_main_loop_timeout_remove_data(ob_main_loop, sn_wait_timeout,
+                                             d, FALSE);
             change = TRUE;
         }
         break;
index e67077fa4d14a1d4ce99b6c65b75359d22f78b4a..aa30ee628f59d0cc927ff62f8f96d72204ed1e8e 100644 (file)
@@ -79,11 +79,16 @@ static void ImageCopyResampled(RrPixel32 *dst, RrPixel32 *src,
                     portionXY = (portionX * portionY) >> FRACTION;
                     sumXY += portionXY;
                     
-                    pixel = *(src + (srcY >> FRACTION) * srcW + (srcX >> FRACTION));
-                    red   += ((pixel >> RrDefaultRedOffset)   & 0xFF) * portionXY;
-                    green += ((pixel >> RrDefaultGreenOffset) & 0xFF) * portionXY;
-                    blue  += ((pixel >> RrDefaultBlueOffset)  & 0xFF) * portionXY;
-                    alpha += ((pixel >> RrDefaultAlphaOffset) & 0xFF) * portionXY;
+                    pixel = *(src + (srcY >> FRACTION) * srcW
+                            + (srcX >> FRACTION));
+                    red   += ((pixel >> RrDefaultRedOffset)   & 0xFF)
+                             * portionXY;
+                    green += ((pixel >> RrDefaultGreenOffset) & 0xFF)
+                             * portionXY;
+                    blue  += ((pixel >> RrDefaultBlueOffset)  & 0xFF)
+                             * portionXY;
+                    alpha += ((pixel >> RrDefaultAlphaOffset) & 0xFF)
+                             * portionXY;
                 }
             }
             
index 77541f6db4ce53b152d59dbe821a7b63235c0d6b..fd95469c87019be80afc503d7c04ca3b94778882 100644 (file)
@@ -114,7 +114,8 @@ void RrPaint(RrAppearance *a, Window win, gint w, gint h)
         case RR_TEXTURE_TEXT:
             if (!transferred) {
                 transferred = 1;
-                if ((a->surface.grad != RR_SURFACE_SOLID) || (a->surface.interlaced))
+                if ((a->surface.grad != RR_SURFACE_SOLID)
+                    || (a->surface.interlaced))
                     pixel_data_to_pixmap(a, 0, 0, w, h);
             }
             if (a->xftdraw == NULL) {
@@ -127,7 +128,8 @@ void RrPaint(RrAppearance *a, Window win, gint w, gint h)
         case RR_TEXTURE_LINE_ART:
             if (!transferred) {
                 transferred = 1;
-                if ((a->surface.grad != RR_SURFACE_SOLID) || (a->surface.interlaced))
+                if ((a->surface.grad != RR_SURFACE_SOLID)
+                    || (a->surface.interlaced))
                     pixel_data_to_pixmap(a, 0, 0, w, h);
             }
             XDrawLine(RrDisplay(a->inst), a->pixmap,
@@ -140,7 +142,8 @@ void RrPaint(RrAppearance *a, Window win, gint w, gint h)
         case RR_TEXTURE_MASK:
             if (!transferred) {
                 transferred = 1;
-                if ((a->surface.grad != RR_SURFACE_SOLID) || (a->surface.interlaced))
+                if ((a->surface.grad != RR_SURFACE_SOLID)
+                    || (a->surface.interlaced))
                     pixel_data_to_pixmap(a, 0, 0, w, h);
             }
             RrPixmapMaskDraw(a->pixmap, &a->texture[i].data.mask, &tarea);
This page took 0.046398 seconds and 4 git commands to generate.