From: Mikael Magnusson Date: Wed, 15 Nov 2006 21:12:06 +0000 (+0000) Subject: 80 cols X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=d3d4aa29871111737a4f6985da695c8688a05270;p=chaz%2Fopenbox 80 cols --- diff --git a/openbox/action.c b/openbox/action.c index 24a0c634..9350c3ce 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -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: diff --git a/openbox/client.c b/openbox/client.c index e4483e1f..88eecf14 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -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; diff --git a/openbox/client_list_menu.c b/openbox/client_list_menu.c index 9f4e786e..569269a3 100644 --- a/openbox/client_list_menu.c +++ b/openbox/client_list_menu.c @@ -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; diff --git a/openbox/event.c b/openbox/event.c index 2c13ceda..21185be9 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -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) diff --git a/openbox/frame.c b/openbox/frame.c index 6c06697a..2c1152ee 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -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 + diff --git a/openbox/place.c b/openbox/place.c index 071e44be..a4c2f588 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -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) diff --git a/openbox/popup.c b/openbox/popup.c index e975294d..4a0ae890 100644 --- a/openbox/popup.c +++ b/openbox/popup.c @@ -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; diff --git a/openbox/screen.c b/openbox/screen.c index eb2e4877..b3bd54ac 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -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; diff --git a/openbox/stacking.c b/openbox/stacking.c index d063cfa2..29b3d1a9 100644 --- a/openbox/stacking.c +++ b/openbox/stacking.c @@ -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); diff --git a/openbox/startupnotify.c b/openbox/startupnotify.c index e32144c0..66258c82 100644 --- a/openbox/startupnotify.c +++ b/openbox/startupnotify.c @@ -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; diff --git a/render/image.c b/render/image.c index e67077fa..aa30ee62 100644 --- a/render/image.c +++ b/render/image.c @@ -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; } } diff --git a/render/render.c b/render/render.c index 77541f6d..fd95469c 100644 --- a/render/render.c +++ b/render/render.c @@ -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);