From 9055d8e8a1b231c6d2acfa94e5364ff22a8b53d9 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 1 Jun 2010 21:09:23 -0400 Subject: [PATCH] [menu] Don't set wimenu window override_redirect. --- cmd/menu/menu.c | 10 +++++----- cmd/strut/ewmh.c | 9 --------- cmd/tray/fns.h | 9 --------- cmd/wmii/ewmh.c | 9 --------- include/stuff/x.h | 9 +++++++++ 5 files changed, 14 insertions(+), 32 deletions(-) diff --git a/cmd/menu/menu.c b/cmd/menu/menu.c index bc7c7bae..e64fce6d 100644 --- a/cmd/menu/menu.c +++ b/cmd/menu/menu.c @@ -27,13 +27,13 @@ void 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 --git a/cmd/strut/ewmh.c b/cmd/strut/ewmh.c index e3262fb8..b965546d 100644 --- a/cmd/strut/ewmh.c +++ b/cmd/strut/ewmh.c @@ -6,15 +6,6 @@ #include #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 --git a/cmd/tray/fns.h b/cmd/tray/fns.h index 61a83b92..0cf9b3ef 100644 --- a/cmd/tray/fns.h +++ b/cmd/tray/fns.h @@ -1,13 +1,4 @@ -#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*); bool client_hasmessage(Client*); diff --git a/cmd/wmii/ewmh.c b/cmd/wmii/ewmh.c index 589c6447..e77df9de 100644 --- a/cmd/wmii/ewmh.c +++ b/cmd/wmii/ewmh.c @@ -13,15 +13,6 @@ static void ewmh_setstate(Client*, Atom, int); 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 --git a/include/stuff/x.h b/include/stuff/x.h index ab0f16ab..5f4870fb 100644 --- a/include/stuff/x.h +++ b/include/stuff/x.h @@ -6,6 +6,15 @@ extern Visual* render_visual; 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*);