mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
cvsimport
This commit is contained in:
commit
3c67ec8ccc
1
calmwm.h
1
calmwm.h
@ -336,6 +336,7 @@ void client_send_delete(struct client_ctx *);
|
|||||||
void client_setactive(struct client_ctx *, int);
|
void client_setactive(struct client_ctx *, int);
|
||||||
void client_setname(struct client_ctx *);
|
void client_setname(struct client_ctx *);
|
||||||
int client_snapcalc(int, int, int, int, int);
|
int client_snapcalc(int, int, int, int, int);
|
||||||
|
void client_transient(struct client_ctx *);
|
||||||
void client_unhide(struct client_ctx *);
|
void client_unhide(struct client_ctx *);
|
||||||
void client_vertmaximize(struct client_ctx *);
|
void client_vertmaximize(struct client_ctx *);
|
||||||
void client_warp(struct client_ctx *);
|
void client_warp(struct client_ctx *);
|
||||||
|
17
client.c
17
client.c
@ -113,6 +113,8 @@ client_new(Window win, struct screen_ctx *sc, int mapped)
|
|||||||
|
|
||||||
XAddToSaveSet(X_Dpy, cc->win);
|
XAddToSaveSet(X_Dpy, cc->win);
|
||||||
|
|
||||||
|
client_transient(cc);
|
||||||
|
|
||||||
/* Notify client of its configuration. */
|
/* Notify client of its configuration. */
|
||||||
xu_configure(cc);
|
xu_configure(cc);
|
||||||
|
|
||||||
@ -869,6 +871,21 @@ client_freehints(struct client_ctx *cc)
|
|||||||
XFree(cc->app_class);
|
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
|
static int
|
||||||
client_inbound(struct client_ctx *cc, int x, int y)
|
client_inbound(struct client_ctx *cc, int x, int y)
|
||||||
{
|
{
|
||||||
|
8
conf.c
8
conf.c
@ -67,10 +67,10 @@ conf_font(struct conf *c, struct screen_ctx *sc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct color color_binds[] = {
|
static struct color color_binds[] = {
|
||||||
{ "#CCCCCC", 0 }, /* CWM_COLOR_BORDOR_ACTIVE */
|
{ "#CCCCCC", 0 }, /* CWM_COLOR_BORDER_ACTIVE */
|
||||||
{ "#666666", 0 }, /* CWM_COLOR_BORDOR_INACTIVE */
|
{ "#666666", 0 }, /* CWM_COLOR_BORDER_INACTIVE */
|
||||||
{ "blue", 0 }, /* CWM_COLOR_BORDOR_GROUP */
|
{ "blue", 0 }, /* CWM_COLOR_BORDER_GROUP */
|
||||||
{ "red", 0 }, /* CWM_COLOR_BORDOR_UNGROUP */
|
{ "red", 0 }, /* CWM_COLOR_BORDER_UNGROUP */
|
||||||
{ "black", 0 }, /* CWM_COLOR_FG_MENU */
|
{ "black", 0 }, /* CWM_COLOR_FG_MENU */
|
||||||
{ "white", 0 }, /* CWM_COLOR_BG_MENU */
|
{ "white", 0 }, /* CWM_COLOR_BG_MENU */
|
||||||
{ "black", 0 }, /* CWM_COLOR_FONT */
|
{ "black", 0 }, /* CWM_COLOR_FONT */
|
||||||
|
10
group.c
10
group.c
@ -313,7 +313,7 @@ group_only(struct screen_ctx *sc, int idx)
|
|||||||
* Cycle through active groups. If none exist, then just stay put.
|
* Cycle through active groups. If none exist, then just stay put.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
group_cycle(struct screen_ctx *sc, int reverse)
|
group_cycle(struct screen_ctx *sc, int flags)
|
||||||
{
|
{
|
||||||
struct group_ctx *gc, *showgroup = NULL;
|
struct group_ctx *gc, *showgroup = NULL;
|
||||||
|
|
||||||
@ -321,11 +321,11 @@ group_cycle(struct screen_ctx *sc, int reverse)
|
|||||||
|
|
||||||
gc = sc->group_active;
|
gc = sc->group_active;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
gc = reverse ? TAILQ_PREV(gc, group_ctx_q, entry) :
|
gc = (flags & CWM_RCYCLE) ? TAILQ_PREV(gc, group_ctx_q,
|
||||||
TAILQ_NEXT(gc, entry);
|
entry) : TAILQ_NEXT(gc, entry);
|
||||||
if (gc == NULL)
|
if (gc == NULL)
|
||||||
gc = reverse ? TAILQ_LAST(&sc->groupq, group_ctx_q) :
|
gc = (flags & CWM_RCYCLE) ? TAILQ_LAST(&sc->groupq,
|
||||||
TAILQ_FIRST(&sc->groupq);
|
group_ctx_q) : TAILQ_FIRST(&sc->groupq);
|
||||||
if (gc == sc->group_active)
|
if (gc == sc->group_active)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user