aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calmwm.h24
-rw-r--r--client.c6
2 files changed, 23 insertions, 7 deletions
diff --git a/calmwm.h b/calmwm.h
index 4b188aa..7818f0b 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: calmwm.h,v 1.287 2015/05/17 04:34:01 kspillner Exp $
+ * $OpenBSD: calmwm.h,v 1.288 2015/05/20 23:54:39 okan Exp $
*/
#ifndef _CALMWM_H_
@@ -304,11 +304,27 @@ struct mwm_hints {
unsigned long functions;
unsigned long decorations;
};
-#define MWM_NUMHINTS 3
-#define PROP_MWM_HINTS_ELEMENTS 3
-#define MWM_HINTS_DECORATIONS (1<<1)
+#define MWM_HINTS_ELEMENTS 3L
+
+#define MWM_FLAGS_FUNCTIONS (1<<0)
+#define MWM_FLAGS_DECORATIONS (1<<1)
+#define MWM_FLAGS_INPUT_MODE (1<<2)
+#define MWM_FLAGS_STATUS (1<<3)
+
+#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_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)
extern Display *X_Dpy;
extern Time Last_Event_Time;
diff --git a/client.c b/client.c
index 9e6bafd..10f1046 100644
--- a/client.c
+++ b/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: client.c,v 1.191 2015/03/29 00:21:05 okan Exp $
+ * $OpenBSD: client.c,v 1.192 2015/05/20 23:54:39 okan Exp $
*/
#include <sys/types.h>
@@ -882,8 +882,8 @@ client_mwm_hints(struct client_ctx *cc)
struct mwm_hints *mwmh;
if (xu_getprop(cc->win, cwmh[_MOTIF_WM_HINTS], cwmh[_MOTIF_WM_HINTS],
- PROP_MWM_HINTS_ELEMENTS, (unsigned char **)&mwmh) == MWM_NUMHINTS) {
- if (mwmh->flags & MWM_HINTS_DECORATIONS &&
+ 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))
cc->bwidth = 0;