all repos — openbox @ d3d4aa29871111737a4f6985da695c8688a05270

openbox fork - make it a bit more like ryudo

80 cols
Mikael Magnusson mikachu@comhem.se
commit

d3d4aa29871111737a4f6985da695c8688a05270

parent

59d35252dd37170a84c053dbff0fa1020e44888f

M openbox/action.copenbox/action.c

@@ -1606,19 +1606,23 @@ y = c->frame->area.y;

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:
M openbox/client.copenbox/client.c

@@ -218,10 +218,11 @@ || (app->class && app->name && !strcmp(app->class, client->class)

&& !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 @@ WANT_EDGE(cur, c)

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 @@ my_offset = c->frame->area.y + (hang ? 0 : c->frame->area.height);

/* 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 @@ WANT_EDGE(cur, c)

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 @@ WANT_EDGE(cur, c)

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 @@ my_offset = c->frame->area.x + (hang ? 0 : c->frame->area.width);

/* 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 @@ WANT_EDGE(cur, c)

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;
M openbox/client_list_menu.copenbox/client_list_menu.c

@@ -75,7 +75,8 @@ acts = g_slist_append(acts, act);

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;
M openbox/event.copenbox/event.c

@@ -1287,7 +1287,8 @@ }

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)
M openbox/frame.copenbox/frame.c

@@ -581,7 +581,8 @@ ob_rr_theme->padding + 1);

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 @@ ob_rr_theme->padding + 1);

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 @@ ob_rr_theme->padding + 1);

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 @@ l = TRUE;

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 @@ ob_rr_theme->padding + 1);

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 +
M openbox/place.copenbox/place.c

@@ -334,7 +334,8 @@

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 @@ return FALSE;

} /* 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)
M openbox/popup.copenbox/popup.c

@@ -319,7 +319,8 @@ horz_inc = -1;

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 @@ horz_inc = screen_desktop_layout.rows;

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;
M openbox/screen.copenbox/screen.c

@@ -296,7 +296,8 @@ if (!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;
M openbox/stacking.copenbox/stacking.c

@@ -284,7 +284,8 @@ ObClient *selected;

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 @@ ObClient *selected;

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);
M openbox/startupnotify.copenbox/startupnotify.c

@@ -177,7 +177,8 @@ case SN_MONITOR_EVENT_COMPLETED:

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;
M render/image.crender/image.c

@@ -79,11 +79,16 @@

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; } }
M render/render.crender/render.c

@@ -114,7 +114,8 @@ break;

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 @@ break;

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 @@ break;

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);