Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h ewmh.c globals.c gnome.c hints.c
Log Message:
Only one ..._WM_CHECK window.
Remove _NET_WM_VERSION (not defined in spec).
Added ENLIGHTENMENT_VERSION property to root window.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -3 -r1.127 -r1.128
--- E.h 12 Jul 2003 08:22:57 -0000 1.127
+++ E.h 12 Jul 2003 14:06:37 -0000 1.128
@@ -2341,6 +2341,7 @@
#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_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 @@
#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 @@
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;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewmh.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ewmh.c 11 Jul 2003 19:49:57 -0000 1.19
+++ ewmh.c 12 Jul 2003 14:06:37 -0000 1.20
@@ -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 @@
/*
* Application Window Properties
*/
-/* _NET_WM_NAME; */
Atom _NET_WM_DESKTOP;
/* _NET_WM_WINDOW_TYPE (window property) */
@@ -192,11 +184,9 @@
/*
* 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 @@
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 @@
_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();
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/globals.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- globals.c 11 Jul 2003 17:58:19 -0000 1.13
+++ globals.c 12 Jul 2003 14:06:37 -0000 1.14
@@ -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;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/gnome.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- gnome.c 22 May 2003 19:15:00 -0000 1.23
+++ gnome.c 12 Jul 2003 14:06:37 -0000 1.24
@@ -586,23 +586,21 @@
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 @@
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 @@
}
void
-GNOME_SetHints(void)
+GNOME_SetHints(Window win_wm_check)
{
EDBUG(6, "GNOME_SetHints");
GNOME_SetWMNameVer();
@@ -767,7 +764,7 @@
GNOME_SetDeskCount();
GNOME_SetDeskNames();
GNOME_SetAreaCount();
- GNOME_SetWMCheck();
+ GNOME_SetWMCheck(win_wm_check);
{
Atom atom_set;
CARD32 val;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/hints.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- hints.c 21 Jun 2003 10:39:20 -0000 1.8
+++ hints.c 12 Jul 2003 14:06:37 -0000 1.9
@@ -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_;
}
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs