mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
mechanical xu_{get,set}state -> xu_{get,set}_wm_state change
This commit is contained in:
parent
302690624e
commit
006a29e617
4
calmwm.h
4
calmwm.h
@ -467,7 +467,7 @@ void xu_configure(struct client_ctx *);
|
|||||||
void xu_getatoms(void);
|
void xu_getatoms(void);
|
||||||
unsigned long xu_getcolor(struct screen_ctx *, char *);
|
unsigned long xu_getcolor(struct screen_ctx *, char *);
|
||||||
int xu_getprop(Window, Atom, Atom, long, u_char **);
|
int xu_getprop(Window, Atom, Atom, long, u_char **);
|
||||||
int xu_getstate(Window, int *);
|
int xu_get_wm_state(Window, int *);
|
||||||
int xu_getstrprop(Window, Atom, char **);
|
int xu_getstrprop(Window, Atom, char **);
|
||||||
void xu_key_grab(Window, int, int);
|
void xu_key_grab(Window, int, int);
|
||||||
void xu_key_ungrab(Window, int, int);
|
void xu_key_ungrab(Window, int, int);
|
||||||
@ -477,7 +477,7 @@ int xu_ptr_regrab(int, Cursor);
|
|||||||
void xu_ptr_setpos(Window, int, int);
|
void xu_ptr_setpos(Window, int, int);
|
||||||
void xu_ptr_ungrab(void);
|
void xu_ptr_ungrab(void);
|
||||||
void xu_sendmsg(Window, Atom, long);
|
void xu_sendmsg(Window, Atom, long);
|
||||||
void xu_setstate(Window win, int);
|
void xu_set_wm_state(Window win, int);
|
||||||
void xu_xorcolor(XRenderColor, XRenderColor,
|
void xu_xorcolor(XRenderColor, XRenderColor,
|
||||||
XRenderColor *);
|
XRenderColor *);
|
||||||
|
|
||||||
|
10
client.c
10
client.c
@ -105,14 +105,14 @@ client_new(Window win, struct screen_ctx *sc, int mapped)
|
|||||||
if ((wmhints = XGetWMHints(X_Dpy, cc->win)) != NULL) {
|
if ((wmhints = XGetWMHints(X_Dpy, cc->win)) != NULL) {
|
||||||
if (wmhints->flags & StateHint) {
|
if (wmhints->flags & StateHint) {
|
||||||
cc->state = wmhints->initial_state;
|
cc->state = wmhints->initial_state;
|
||||||
xu_setstate(cc->win, cc->state);
|
xu_set_wm_state(cc->win, cc->state);
|
||||||
}
|
}
|
||||||
XFree(wmhints);
|
XFree(wmhints);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
client_draw_border(cc);
|
client_draw_border(cc);
|
||||||
|
|
||||||
if (xu_getstate(cc->win, &state) < 0)
|
if (xu_get_wm_state(cc->win, &state) < 0)
|
||||||
state = NormalState;
|
state = NormalState;
|
||||||
|
|
||||||
XSelectInput(X_Dpy, cc->win, ColormapChangeMask | EnterWindowMask |
|
XSelectInput(X_Dpy, cc->win, ColormapChangeMask | EnterWindowMask |
|
||||||
@ -153,7 +153,7 @@ client_delete(struct client_ctx *cc)
|
|||||||
|
|
||||||
XGrabServer(X_Dpy);
|
XGrabServer(X_Dpy);
|
||||||
cc->state = WithdrawnState;
|
cc->state = WithdrawnState;
|
||||||
xu_setstate(cc->win, cc->state);
|
xu_set_wm_state(cc->win, cc->state);
|
||||||
XRemoveFromSaveSet(X_Dpy, cc->win);
|
XRemoveFromSaveSet(X_Dpy, cc->win);
|
||||||
|
|
||||||
XSync(X_Dpy, False);
|
XSync(X_Dpy, False);
|
||||||
@ -454,7 +454,7 @@ client_hide(struct client_ctx *cc)
|
|||||||
cc->active = 0;
|
cc->active = 0;
|
||||||
cc->flags |= CLIENT_HIDDEN;
|
cc->flags |= CLIENT_HIDDEN;
|
||||||
cc->state = IconicState;
|
cc->state = IconicState;
|
||||||
xu_setstate(cc->win, cc->state);
|
xu_set_wm_state(cc->win, cc->state);
|
||||||
|
|
||||||
if (cc == client_current())
|
if (cc == client_current())
|
||||||
client_none(cc->sc);
|
client_none(cc->sc);
|
||||||
@ -467,7 +467,7 @@ client_unhide(struct client_ctx *cc)
|
|||||||
|
|
||||||
cc->flags &= ~CLIENT_HIDDEN;
|
cc->flags &= ~CLIENT_HIDDEN;
|
||||||
cc->state = NormalState;
|
cc->state = NormalState;
|
||||||
xu_setstate(cc->win, cc->state);
|
xu_set_wm_state(cc->win, cc->state);
|
||||||
client_draw_border(cc);
|
client_draw_border(cc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
xutil.c
4
xutil.c
@ -203,7 +203,7 @@ xu_getstrprop(Window win, Atom atm, char **text) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
xu_getstate(Window win, int *state)
|
xu_get_wm_state(Window win, int *state)
|
||||||
{
|
{
|
||||||
long *p = NULL;
|
long *p = NULL;
|
||||||
|
|
||||||
@ -218,7 +218,7 @@ xu_getstate(Window win, int *state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
xu_setstate(Window win, int state)
|
xu_set_wm_state(Window win, int state)
|
||||||
{
|
{
|
||||||
long dat[2];
|
long dat[2];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user