Only one ..._WM_CHECK window.
Remove _NET_WM_VERSION (not defined in spec). Added ENLIGHTENMENT_VERSION property to root window. SVN revision: 7153
This commit is contained in:
parent
d52a504b4d
commit
39e322bc7c
9
src/E.h
9
src/E.h
|
@ -2341,6 +2341,7 @@ void deleteHint(Window win, Atom atom);
|
|||
|
||||
#if ENABLE_GNOME
|
||||
/* gnome.c functions */
|
||||
void GNOME_SetHints(Window win_wm_check);
|
||||
void GNOME_GetHintIcons(EWin * ewin, Atom atom_change);
|
||||
void GNOME_SetCurrentDesk(void);
|
||||
void GNOME_SetUsedHints(void);
|
||||
|
@ -2351,17 +2352,14 @@ void GNOME_GetHintAppState(EWin * ewin, Atom atom_change);
|
|||
void GNOME_GetHintState(EWin * ewin, Atom atom_change);
|
||||
void GNOME_GetHintLayer(EWin * ewin, Atom atom_change);
|
||||
void GNOME_SetEwinArea(EWin * ewin);
|
||||
void GNOME_SetWMCheck(void);
|
||||
void GNOME_SetDeskCount(void);
|
||||
void GNOME_SetDeskNames(void);
|
||||
void GNOME_SetClientList(void);
|
||||
void GNOME_GetHints(EWin * ewin, Atom atom_change);
|
||||
void GNOME_SetHint(EWin * ewin);
|
||||
void GNOME_SetEwinDesk(EWin * ewin);
|
||||
void GNOME_SetHints(void);
|
||||
void GNOME_SetCurrentArea(void);
|
||||
void GNOME_SetAreaCount(void);
|
||||
void GNOME_SetWMNameVer(void);
|
||||
void GNOME_DelHints(EWin * ewin);
|
||||
void GNOME_ProcessClientMessage(XClientMessageEvent * event);
|
||||
#endif
|
||||
|
@ -2384,7 +2382,7 @@ void KDE_UpdateClient(EWin * ewin);
|
|||
|
||||
#if ENABLE_EWMH
|
||||
/* ewmh.c functions */
|
||||
void EWMH_Init(void);
|
||||
void EWMH_Init(Window win_wm_check);
|
||||
void EWMH_SetDesktopCount(void);
|
||||
void EWMH_SetDesktopNames(void);
|
||||
void EWMH_SetDesktopSize(void);
|
||||
|
@ -3003,6 +3001,9 @@ char CanZoom(void);
|
|||
void ZoomInit(void);
|
||||
void Zoom(EWin * ewin);
|
||||
|
||||
/* Global vars */
|
||||
extern const char e_wm_name[];
|
||||
extern const char e_wm_version[];
|
||||
extern pid_t master_pid;
|
||||
extern int master_screen;
|
||||
extern int display_screens;
|
||||
|
|
23
src/ewmh.c
23
src/ewmh.c
|
@ -49,18 +49,11 @@
|
|||
XChangeProperty(disp, win, atom, XA_CARDINAL, 32, PropModeReplace, \
|
||||
(unsigned char *)p_val, cnt)
|
||||
|
||||
/* These should be global */
|
||||
static const char wm_name[] = "Enlightenment";
|
||||
static const char wm_version[] = ENLIGHTENMENT_VERSION;
|
||||
|
||||
/* Will become predefined? */
|
||||
Atom E_XA_UTF8_STRING;
|
||||
|
||||
/* Move to ewmh.h? */
|
||||
|
||||
/* Window manager info */
|
||||
Atom _NET_WM_NAME;
|
||||
Atom _NET_WM_VERSION;
|
||||
Atom _NET_SUPPORTED;
|
||||
Atom _NET_SUPPORTING_WM_CHECK;
|
||||
|
||||
|
@ -102,7 +95,6 @@ Atom _NET_WM_MOVERESIZE;
|
|||
/*
|
||||
* Application Window Properties
|
||||
*/
|
||||
/* _NET_WM_NAME; */
|
||||
Atom _NET_WM_DESKTOP;
|
||||
|
||||
/* _NET_WM_WINDOW_TYPE (window property) */
|
||||
|
@ -192,11 +184,9 @@ winlist_rindex(Window * wl, int len, Window win)
|
|||
/*
|
||||
* Initialize EWMH stuff
|
||||
*/
|
||||
|
||||
void
|
||||
EWMH_Init(void)
|
||||
EWMH_Init(Window win_wm_check)
|
||||
{
|
||||
Window win; /* Should be elsewhere ? */
|
||||
Atom atom_list[64];
|
||||
int atom_count;
|
||||
|
||||
|
@ -207,7 +197,6 @@ EWMH_Init(void)
|
|||
atom_count = 0;
|
||||
|
||||
_ATOM_INIT(_NET_WM_NAME);
|
||||
_ATOM_INIT(_NET_WM_VERSION);
|
||||
_ATOM_INIT(_NET_SUPPORTED);
|
||||
_ATOM_INIT(_NET_SUPPORTING_WM_CHECK);
|
||||
|
||||
|
@ -256,13 +245,11 @@ EWMH_Init(void)
|
|||
_ATOM_SET_ATOM(_NET_SUPPORTED, root.win, atom_list, atom_count);
|
||||
|
||||
/* Set WM info properties */
|
||||
_ATOM_SET_UTF8_STRING(_NET_WM_NAME, root.win, wm_name);
|
||||
_ATOM_SET_UTF8_STRING(_NET_WM_VERSION, root.win, wm_version);
|
||||
_ATOM_SET_UTF8_STRING(_NET_WM_NAME, root.win, e_wm_name);
|
||||
|
||||
win = ECreateWindow(root.win, -200, -200, 5, 5, 0);
|
||||
_ATOM_SET_WINDOW(_NET_SUPPORTING_WM_CHECK, root.win, &win, 1);
|
||||
_ATOM_SET_WINDOW(_NET_SUPPORTING_WM_CHECK, win, &win, 1);
|
||||
_ATOM_SET_UTF8_STRING(_NET_WM_NAME, win, wm_name);
|
||||
_ATOM_SET_WINDOW(_NET_SUPPORTING_WM_CHECK, root.win, &win_wm_check, 1);
|
||||
_ATOM_SET_WINDOW(_NET_SUPPORTING_WM_CHECK, win_wm_check, &win_wm_check, 1);
|
||||
_ATOM_SET_UTF8_STRING(_NET_WM_NAME, win_wm_check, e_wm_name);
|
||||
|
||||
EWMH_SetDesktopCount();
|
||||
EWMH_SetDesktopNames();
|
||||
|
|
|
@ -22,6 +22,13 @@
|
|||
*/
|
||||
#include "E.h"
|
||||
|
||||
const char e_wm_name[] = "Enlightenment";
|
||||
const char e_wm_version[] =
|
||||
#ifdef ENLIGHTENMENT_RELEASE
|
||||
"enlightenment-" ENLIGHTENMENT_VERSION "-" ENLIGHTENMENT_RELEASE;
|
||||
#else
|
||||
"enlightenment-" ENLIGHTENMENT_VERSION;
|
||||
#endif
|
||||
pid_t master_pid;
|
||||
int master_screen;
|
||||
int display_screens;
|
||||
|
|
25
src/gnome.c
25
src/gnome.c
|
@ -586,23 +586,21 @@ GNOME_SetCurrentDesk(void)
|
|||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
void
|
||||
GNOME_SetWMCheck(void)
|
||||
static void
|
||||
GNOME_SetWMCheck(Window win_wm_check)
|
||||
{
|
||||
static Atom atom_set = 0;
|
||||
CARD32 val;
|
||||
Window win;
|
||||
|
||||
EDBUG(6, "GNOME_SetWMCheck");
|
||||
|
||||
if (!atom_set)
|
||||
atom_set = XInternAtom(disp, XA_WIN_SUPPORTING_WM_CHECK, False);
|
||||
win = ECreateWindow(root.win, -200, -200, 5, 5, 0);
|
||||
val = win;
|
||||
XChangeProperty(disp, root.win, atom_set, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)&val, 1);
|
||||
XChangeProperty(disp, win, atom_set, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)&val, 1);
|
||||
val = win_wm_check;
|
||||
XChangeProperty(disp, root.win, atom_set, XA_CARDINAL,
|
||||
32, PropModeReplace, (unsigned char *)&val, 1);
|
||||
XChangeProperty(disp, win_wm_check, atom_set, XA_CARDINAL,
|
||||
32, PropModeReplace, (unsigned char *)&val, 1);
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
|
@ -699,18 +697,17 @@ GNOME_SetClientList(void)
|
|||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
GNOME_SetWMNameVer(void)
|
||||
{
|
||||
static Atom atom_set = 0, atom_set2 = 0;
|
||||
const char *wm_name = "Enlightenment";
|
||||
const char *wm_version = ENLIGHTENMENT_VERSION;
|
||||
|
||||
EDBUG(6, "GNOME_SetWMNameVer");
|
||||
if (!atom_set)
|
||||
atom_set = XInternAtom(disp, XA_WIN_WM_NAME, False);
|
||||
XChangeProperty(disp, root.win, atom_set, XA_STRING, 8, PropModeReplace,
|
||||
(unsigned char *)wm_name, strlen(wm_name));
|
||||
(unsigned char *)e_wm_name, strlen(e_wm_name));
|
||||
if (!atom_set2)
|
||||
atom_set2 = XInternAtom(disp, XA_WIN_WM_VERSION, False);
|
||||
XChangeProperty(disp, root.win, atom_set2, XA_STRING, 8, PropModeReplace,
|
||||
|
@ -759,7 +756,7 @@ GNOME_GetHints(EWin * ewin, Atom atom_change)
|
|||
}
|
||||
|
||||
void
|
||||
GNOME_SetHints(void)
|
||||
GNOME_SetHints(Window win_wm_check)
|
||||
{
|
||||
EDBUG(6, "GNOME_SetHints");
|
||||
GNOME_SetWMNameVer();
|
||||
|
@ -767,7 +764,7 @@ GNOME_SetHints(void)
|
|||
GNOME_SetDeskCount();
|
||||
GNOME_SetDeskNames();
|
||||
GNOME_SetAreaCount();
|
||||
GNOME_SetWMCheck();
|
||||
GNOME_SetWMCheck(win_wm_check);
|
||||
{
|
||||
Atom atom_set;
|
||||
CARD32 val;
|
||||
|
|
11
src/hints.c
11
src/hints.c
|
@ -32,17 +32,24 @@
|
|||
void
|
||||
HintsInit(void)
|
||||
{
|
||||
Atom atom;
|
||||
Window win;
|
||||
|
||||
EDBUG(6, "HintsInit");
|
||||
win = ECreateWindow(root.win, -200, -200, 5, 5, 0);
|
||||
ICCCM_Init();
|
||||
#if ENABLE_KDE
|
||||
/* ??? */
|
||||
#endif
|
||||
#if ENABLE_GNOME
|
||||
GNOME_SetHints();
|
||||
GNOME_SetHints(win);
|
||||
#endif
|
||||
#if ENABLE_EWMH
|
||||
EWMH_Init();
|
||||
EWMH_Init(win);
|
||||
#endif
|
||||
atom = XInternAtom(disp, "ENLIGHTENMENT_VERSION", False);
|
||||
XChangeProperty(disp, root.win, atom, XA_STRING, 8, PropModeReplace,
|
||||
(unsigned char *)e_wm_version, strlen(e_wm_version));
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue