Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
ecore-e16.h hints.c hints.h
Log Message:
Cleanups.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ecore-e16.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ecore-e16.h 12 Feb 2006 19:14:14 -0000 1.17
+++ ecore-e16.h 13 Feb 2006 19:15:56 -0000 1.18
@@ -25,18 +25,6 @@
#include <Ecore_X.h>
#include <Ecore_X_Atoms.h>
-/* WM identification */
-extern Ecore_X_Atom ECORE_X_ATOM_NET_SUPPORTED;
-extern Ecore_X_Atom ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK;
-
-/* Misc window ops */
-extern Ecore_X_Atom ECORE_X_ATOM_NET_CLOSE_WINDOW;
-extern Ecore_X_Atom ECORE_X_ATOM_NET_WM_MOVERESIZE;
-
-/* Startup notification */
-extern Ecore_X_Atom ECORE_X_ATOM_NET_STARTUP_INFO_BEGIN;
-extern Ecore_X_Atom ECORE_X_ATOM_NET_STARTUP_INFO;
-
#else
#define Ecore_X_ID XID
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/hints.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- hints.c 7 Jan 2006 07:20:58 -0000 1.58
+++ hints.c 13 Feb 2006 19:15:56 -0000 1.59
@@ -31,8 +31,15 @@
#include "hints.h"
#include "xwin.h"
-static Atom ENL_WIN_DATA;
-static Atom ENL_WIN_BORDER;
+/* Misc atoms */
+Atom E_XROOTPMAP_ID;
+Atom E_XROOTCOLOR_PIXEL;
+
+/* E16 atoms */
+static Ecore_X_Atom ENL_INTERNAL_AREA_DATA;
+static Ecore_X_Atom ENL_INTERNAL_DESK_DATA;
+static Ecore_X_Atom ENL_WIN_DATA;
+static Ecore_X_Atom ENL_WIN_BORDER;
/*
* Functions that set X11-properties from E-internals
@@ -44,6 +51,14 @@
Atom atom;
Window win;
+ E_XROOTPMAP_ID = XInternAtom(disp, "_XROOTPMAP_ID", False);
+ E_XROOTCOLOR_PIXEL = XInternAtom(disp, "_XROOTCOLOR_PIXEL", False);
+
+ ENL_INTERNAL_AREA_DATA = XInternAtom(disp, "ENL_INTERNAL_AREA_DATA", False);
+ ENL_INTERNAL_DESK_DATA = XInternAtom(disp, "ENL_INTERNAL_DESK_DATA", False);
+ ENL_WIN_DATA = XInternAtom(disp, "ENL_WIN_DATA", False);
+ ENL_WIN_BORDER = XInternAtom(disp, "ENL_WIN_BORDER", False);
+
win = ECreateWindow(VRoot.win, -200, -200, 5, 5, 0);
ICCCM_Init();
@@ -62,9 +77,6 @@
}
Mode.hints.old_root_pmap = HintsGetRootPixmap(VRoot.win);
-
- ENL_WIN_DATA = XInternAtom(disp, "ENL_WIN_DATA", False);
- ENL_WIN_BORDER = XInternAtom(disp, "ENL_WIN_BORDER", False);
}
void
@@ -268,14 +280,11 @@
Pixmap
HintsGetRootPixmap(Window win)
{
- Atom a = 0;
Ecore_X_Pixmap pm;
int num;
- a = XInternAtom(disp, "_XROOTPMAP_ID", False);
-
pm = None;
- num = ecore_x_window_prop_xid_get(win, a, XA_PIXMAP, &pm, 1);
+ num = ecore_x_window_prop_xid_get(win, E_XROOTPMAP_ID, XA_PIXMAP, &pm, 1);
return pm;
}
@@ -283,22 +292,15 @@
void
HintsSetRootInfo(Window win, Pixmap pmap, unsigned int color)
{
- static Atom a = 0, aa = 0;
Ecore_X_Pixmap pm;
- if (!a)
- {
- a = XInternAtom(disp, "_XROOTPMAP_ID", False);
- aa = XInternAtom(disp, "_XROOTCOLOR_PIXEL", False);
- }
-
if (Conf.hints.set_xroot_info_on_root_window)
win = VRoot.win;
pm = pmap;
- ecore_x_window_prop_xid_set(win, a, XA_PIXMAP, &pm, 1);
+ ecore_x_window_prop_xid_set(win, E_XROOTPMAP_ID, XA_PIXMAP, &pm, 1);
- ecore_x_window_prop_card32_set(win, aa, &color, 1);
+ ecore_x_window_prop_card32_set(win, E_XROOTCOLOR_PIXEL, &color, 1);
}
typedef union
@@ -367,22 +369,7 @@
num = ecore_x_window_prop_card32_get(_EwinGetClientXwin(ewin), ENL_WIN_DATA,
(unsigned int *)c, ENL_DATA_ITEMS + 1);
if (num != ENL_DATA_ITEMS)
- {
-#if 1 /* FIXME - Remove this after a while */
- num =
- ecore_x_window_prop_card32_get(_EwinGetClientXwin(ewin),
- XInternAtom(disp, "ENL_INTERNAL_DATA",
- False),
- (unsigned int *)c, 1);
- if (num > 0)
- {
- ewin->state.identified = 1;
- ewin->client.grav = StaticGravity;
- ewin->state.placed = 1;
- }
-#endif
- return;
- }
+ return;
ewin->state.identified = 1;
ewin->client.grav = StaticGravity;
@@ -417,7 +404,6 @@
void
EHintsSetDeskInfo(void)
{
- Atom a;
int i, ax, ay, n_desks;
unsigned int *c;
@@ -436,12 +422,11 @@
c[(i * 2) + 1] = ay;
}
- a = XInternAtom(disp, "ENL_INTERNAL_AREA_DATA", False);
- ecore_x_window_prop_card32_set(VRoot.win, a, c, 2 * n_desks);
+ ecore_x_window_prop_card32_set(VRoot.win, ENL_INTERNAL_AREA_DATA,
+ c, 2 * n_desks);
- a = XInternAtom(disp, "ENL_INTERNAL_DESK_DATA", False);
c[0] = DesksGetCurrentNum();
- ecore_x_window_prop_card32_set(VRoot.win, a, c, 1);
+ ecore_x_window_prop_card32_set(VRoot.win, ENL_INTERNAL_DESK_DATA, c, 1);
Efree(c);
}
@@ -449,7 +434,6 @@
void
EHintsGetDeskInfo(void)
{
- Atom a;
unsigned int *c;
int num, i, n_desks;
@@ -458,16 +442,16 @@
if (!c)
return;
- a = XInternAtom(disp, "ENL_INTERNAL_AREA_DATA", False);
- num = ecore_x_window_prop_card32_get(VRoot.win, a, c, 2 * n_desks);
+ num = ecore_x_window_prop_card32_get(VRoot.win, ENL_INTERNAL_AREA_DATA,
+ c, 2 * n_desks);
if (num > 0)
{
for (i = 0; i < (num / 2); i++)
DeskSetArea(DeskGet(i), c[(i * 2)], c[(i * 2) + 1]);
}
- a = XInternAtom(disp, "ENL_INTERNAL_DESK_DATA", False);
- num = ecore_x_window_prop_card32_get(VRoot.win, a, c, 1);
+ num = ecore_x_window_prop_card32_get(VRoot.win, ENL_INTERNAL_DESK_DATA,
+ c, 1);
if (num > 0)
{
DesksSetCurrent(DeskGet(c[0]));
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/hints.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- hints.h 12 Feb 2006 19:14:14 -0000 1.5
+++ hints.h 13 Feb 2006 19:15:56 -0000 1.6
@@ -24,6 +24,10 @@
#ifndef _HINTS_H_
#define _HINTS_H_
+/* Misc atoms */
+Atom E_XROOTPMAP_ID;
+Atom E_XROOTCOLOR_PIXEL;
+
/* ewmh.c */
void EWMH_Init(Window win_wm_check);
void EWMH_SetDesktopCount(void);
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs