changeset: 2685:1adfca67701a
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Tue Jun 01 21:09:23 2010 -0400
files: cmd/menu/menu.c cmd/strut/ewmh.c cmd/tray/fns.h cmd/wmii/ewmh.c include/stuff/x.h
description:
[menu] Don't set wimenu window override_redirect.
diff -r 660b8c88382c -r 1adfca67701a cmd/menu/menu.c
--- a/cmd/menu/menu.c Tue Jun 01 20:09:25 2010 -0400
+++ b/cmd/menu/menu.c Tue Jun 01 21:09:23 2010 -0400
@@ -27,13 +27,13 @@
menu_init(void) {
WinAttr wa;
- wa.override_redirect = 1;
- wa.background_pixmap = ParentRelative;
wa.event_mask = ExposureMask | KeyPressMask;
barwin = createwindow(&scr.root, Rect(-1, -1, 1, 1), scr.depth, InputOutput,
- &wa, CWOverrideRedirect
- | CWBackPixmap
- | CWEventMask);
+ &wa, CWEventMask);
+
+ changeprop_long(barwin, Net("WM_WINDOW_TYPE"), "ATOM",
+ (long[]){ TYPE("MENU") }, 1);
+
sethandler(barwin, &handlers);
mapwin(barwin);
diff -r 660b8c88382c -r 1adfca67701a cmd/strut/ewmh.c
--- a/cmd/strut/ewmh.c Tue Jun 01 20:09:25 2010 -0400
+++ b/cmd/strut/ewmh.c Tue Jun 01 21:09:23 2010 -0400
@@ -6,15 +6,6 @@
#include <string.h>
#include "fns.h"
-#define Net(x) ("_NET_" x)
-#define Action(x) ("_NET_WM_ACTION_" x)
-#define State(x) ("_NET_WM_STATE_" x)
-#define Type(x) ("_NET_WM_WINDOW_TYPE_" x)
-#define NET(x) xatom(Net(x))
-#define ACTION(x) xatom(Action(x))
-#define STATE(x) xatom(State(x))
-#define TYPE(x) xatom(Type(x))
-
enum {
Left, Right, Top, Bottom,
LeftMin, LeftMax,
diff -r 660b8c88382c -r 1adfca67701a cmd/tray/fns.h
--- a/cmd/tray/fns.h Tue Jun 01 20:09:25 2010 -0400
+++ b/cmd/tray/fns.h Tue Jun 01 21:09:23 2010 -0400
@@ -1,12 +1,3 @@
-
-#define Net(x) ("_NET_" x)
-#define Action(x) ("_NET_WM_ACTION_" x)
-#define State(x) ("_NET_WM_STATE_" x)
-#define Type(x) ("_NET_WM_WINDOW_TYPE_" x)
-#define NET(x) xatom(Net(x))
-#define ACTION(x) xatom(Action(x))
-#define STATE(x) xatom(State(x))
-#define TYPE(x) xatom(Type(x))
void cleanup(Selection*);
Client* client_find(Window*);
diff -r 660b8c88382c -r 1adfca67701a cmd/wmii/ewmh.c
--- a/cmd/wmii/ewmh.c Tue Jun 01 20:09:25 2010 -0400
+++ b/cmd/wmii/ewmh.c Tue Jun 01 21:09:23 2010 -0400
@@ -13,15 +13,6 @@
static Handlers client_handlers;
static Handlers root_handlers;
-#define Net(x) ("_NET_" x)
-#define Action(x) Net("WM_ACTION_" x)
-#define State(x) Net("WM_STATE_" x)
-#define Type(x) Net("WM_WINDOW_TYPE_" x)
-#define NET(x) xatom(Net(x))
-#define ACTION(x) xatom(Action(x))
-#define STATE(x) xatom(State(x))
-#define TYPE(x) xatom(Type(x))
-
void
ewmh_init(void) {
char myname[] = "wmii";
diff -r 660b8c88382c -r 1adfca67701a include/stuff/x.h
--- a/include/stuff/x.h Tue Jun 01 20:09:25 2010 -0400
+++ b/include/stuff/x.h Tue Jun 01 21:09:23 2010 -0400
@@ -6,6 +6,15 @@
extern void init_screens(void);
+#define Net(x) ("_NET_" x)
+#define Action(x) ("_NET_WM_ACTION_" x)
+#define State(x) ("_NET_WM_STATE_" x)
+#define Type(x) ("_NET_WM_WINDOW_TYPE_" x)
+#define NET(x) xatom(Net(x))
+#define ACTION(x) xatom(Action(x))
+#define STATE(x) xatom(State(x))
+#define TYPE(x) xatom(Type(x))
+
/* printevent.c */
int fmtevent(Fmt*);
Received on Wed Jun 02 2010 - 01:09:55 UTC
This archive was generated by hypermail 2.2.0 : Wed Jun 02 2010 - 01:12:03 UTC