mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Fix spelling of some unused MWM hints; from Sean C. Farley.
While here, flesh out the rest of the MWM hints.
This commit is contained in:
parent
7c22b36a23
commit
5e5221d82d
45
calmwm.h
45
calmwm.h
@ -309,30 +309,39 @@ struct conf {
|
||||
|
||||
/* MWM hints */
|
||||
struct mwm_hints {
|
||||
#define MWM_HINTS_ELEMENTS 3L
|
||||
#define MWM_FLAGS_STATUS (1<<3)
|
||||
#define MWM_HINTS_ELEMENTS 5L
|
||||
|
||||
#define MWM_FLAGS_FUNCTIONS (1<<0)
|
||||
#define MWM_FLAGS_DECORATIONS (1<<1)
|
||||
#define MWM_FLAGS_INPUT_MODE (1<<2)
|
||||
#define MWM_HINTS_FUNCTIONS (1L << 0)
|
||||
#define MWM_HINTS_DECORATIONS (1L << 1)
|
||||
#define MWM_HINTS_INPUT_MODE (1L << 2)
|
||||
#define MWM_HINTS_STATUS (1L << 3)
|
||||
unsigned long flags;
|
||||
|
||||
#define MWM_FUNCS_ALL (1<<0)
|
||||
#define MWM_FUNCS_RESIZE (1<<1)
|
||||
#define MWM_FUNCS_MOVE (1<<2)
|
||||
#define MWM_FUNCS_MINIMIZE (1<<3)
|
||||
#define MWM_FUNCS_MAXIMIZE (1<<4)
|
||||
#define MWM_FUNCS_CLOSE (1<<5)
|
||||
#define MWM_FUNC_ALL (1L << 0)
|
||||
#define MWM_FUNC_RESIZE (1L << 1)
|
||||
#define MWM_FUNC_MOVE (1L << 2)
|
||||
#define MWM_FUNC_MINIMIZE (1L << 3)
|
||||
#define MWM_FUNC_MAXIMIZE (1L << 4)
|
||||
#define MWM_FUNC_CLOSE (1L << 5)
|
||||
unsigned long functions;
|
||||
|
||||
#define MWM_DECOR_ALL (1<<0)
|
||||
#define MWM_DECOR_BORDER (1<<1)
|
||||
#define MWM_DECOR_RESIZE_HANDLE (1<<2)
|
||||
#define MWM_DECOR_TITLEBAR (1<<3)
|
||||
#define MWM_DECOR_MENU (1<<4)
|
||||
#define MWM_DECOR_MINIMIZE (1<<5)
|
||||
#define MWM_DECOR_MAXIMIZE (1<<6)
|
||||
#define MWM_DECOR_ALL (1L << 0)
|
||||
#define MWM_DECOR_BORDER (1L << 1)
|
||||
#define MWM_DECOR_RESIZEH (1L << 2)
|
||||
#define MWM_DECOR_TITLE (1L << 3)
|
||||
#define MWM_DECOR_MENU (1L << 4)
|
||||
#define MWM_DECOR_MINIMIZE (1L << 5)
|
||||
#define MWM_DECOR_MAXIMIZE (1L << 6)
|
||||
unsigned long decorations;
|
||||
|
||||
#define MWM_INPUT_MODELESS 0
|
||||
#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1
|
||||
#define MWM_INPUT_SYSTEM_MODAL 2
|
||||
#define MWM_INPUT_FULL_APPLICATION_MODAL 3
|
||||
long inputMode;
|
||||
|
||||
#define MWM_TEAROFF_WINDOW (1L << 0)
|
||||
unsigned long status;
|
||||
};
|
||||
|
||||
enum cwmh {
|
||||
|
12
client.c
12
client.c
@ -849,13 +849,15 @@ client_mwm_hints(struct client_ctx *cc)
|
||||
|
||||
if (xu_get_prop(cc->win, cwmh[_MOTIF_WM_HINTS],
|
||||
cwmh[_MOTIF_WM_HINTS], MWM_HINTS_ELEMENTS,
|
||||
(unsigned char **)&mwmh) == MWM_HINTS_ELEMENTS) {
|
||||
if (mwmh->flags & MWM_FLAGS_DECORATIONS &&
|
||||
!(mwmh->decorations & MWM_DECOR_ALL) &&
|
||||
!(mwmh->decorations & MWM_DECOR_BORDER))
|
||||
(unsigned char **)&mwmh) <= 0)
|
||||
return;
|
||||
|
||||
if ((mwmh->flags & MWM_HINTS_DECORATIONS) &&
|
||||
!(mwmh->decorations & MWM_DECOR_ALL)) {
|
||||
if (!(mwmh->decorations & MWM_DECOR_BORDER))
|
||||
cc->bwidth = 0;
|
||||
XFree(mwmh);
|
||||
}
|
||||
XFree(mwmh);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user