cvsimport

This commit is contained in:
okan 2011-09-13 09:17:30 +00:00
commit 3c67ec8ccc
5 changed files with 30 additions and 9 deletions

View File

@ -336,6 +336,7 @@ void client_send_delete(struct client_ctx *);
void client_setactive(struct client_ctx *, int);
void client_setname(struct client_ctx *);
int client_snapcalc(int, int, int, int, int);
void client_transient(struct client_ctx *);
void client_unhide(struct client_ctx *);
void client_vertmaximize(struct client_ctx *);
void client_warp(struct client_ctx *);

View File

@ -113,6 +113,8 @@ client_new(Window win, struct screen_ctx *sc, int mapped)
XAddToSaveSet(X_Dpy, cc->win);
client_transient(cc);
/* Notify client of its configuration. */
xu_configure(cc);
@ -869,6 +871,21 @@ client_freehints(struct client_ctx *cc)
XFree(cc->app_class);
}
void
client_transient(struct client_ctx *cc)
{
struct client_ctx *tc;
Window trans;
if (XGetTransientForHint(X_Dpy, cc->win, &trans)) {
if ((tc = client_find(trans)) && tc->group) {
group_movetogroup(cc, tc->group->shortcut - 1);
if (tc->flags & CLIENT_IGNORE)
cc->flags |= CLIENT_IGNORE;
}
}
}
static int
client_inbound(struct client_ctx *cc, int x, int y)
{

8
conf.c
View File

@ -67,10 +67,10 @@ conf_font(struct conf *c, struct screen_ctx *sc)
}
static struct color color_binds[] = {
{ "#CCCCCC", 0 }, /* CWM_COLOR_BORDOR_ACTIVE */
{ "#666666", 0 }, /* CWM_COLOR_BORDOR_INACTIVE */
{ "blue", 0 }, /* CWM_COLOR_BORDOR_GROUP */
{ "red", 0 }, /* CWM_COLOR_BORDOR_UNGROUP */
{ "#CCCCCC", 0 }, /* CWM_COLOR_BORDER_ACTIVE */
{ "#666666", 0 }, /* CWM_COLOR_BORDER_INACTIVE */
{ "blue", 0 }, /* CWM_COLOR_BORDER_GROUP */
{ "red", 0 }, /* CWM_COLOR_BORDER_UNGROUP */
{ "black", 0 }, /* CWM_COLOR_FG_MENU */
{ "white", 0 }, /* CWM_COLOR_BG_MENU */
{ "black", 0 }, /* CWM_COLOR_FONT */

10
group.c
View File

@ -313,7 +313,7 @@ group_only(struct screen_ctx *sc, int idx)
* Cycle through active groups. If none exist, then just stay put.
*/
void
group_cycle(struct screen_ctx *sc, int reverse)
group_cycle(struct screen_ctx *sc, int flags)
{
struct group_ctx *gc, *showgroup = NULL;
@ -321,11 +321,11 @@ group_cycle(struct screen_ctx *sc, int reverse)
gc = sc->group_active;
for (;;) {
gc = reverse ? TAILQ_PREV(gc, group_ctx_q, entry) :
TAILQ_NEXT(gc, entry);
gc = (flags & CWM_RCYCLE) ? TAILQ_PREV(gc, group_ctx_q,
entry) : TAILQ_NEXT(gc, entry);
if (gc == NULL)
gc = reverse ? TAILQ_LAST(&sc->groupq, group_ctx_q) :
TAILQ_FIRST(&sc->groupq);
gc = (flags & CWM_RCYCLE) ? TAILQ_LAST(&sc->groupq,
group_ctx_q) : TAILQ_FIRST(&sc->groupq);
if (gc == sc->group_active)
break;

View File

@ -192,6 +192,9 @@ xev_handle_propertynotify(XEvent *ee)
case XA_WM_NAME:
client_setname(cc);
break;
case XA_WM_TRANSIENT_FOR:
client_transient(cc);
break;
default:
/* do nothing */
break;