Use ecore_x exported atoms.

SVN revision: 12360
This commit is contained in:
Kim Woelders 2004-12-05 09:30:59 +00:00
parent 73f8ea23f1
commit e6dc661ce1
3 changed files with 13 additions and 41 deletions

View File

@ -1,31 +1,12 @@
#include "e.h"
/* atom globals */
int _e_atom_wm_name = 0;
int _e_atom_wm_class = 0;
int _e_atom_wm_hints = 0;
int _e_atom_wm_size_hints = 0;
int _e_atom_wm_protocols = 0;
int _e_atom_wm_icon_name = 0;
int _e_atom_wm_client_machine = 0;
int _e_atom_motif_wm_hints = 0;
int _e_atom_netwm_pid = 0;
int _e_atom_netwm_desktop = 0;
/* Atoms */
/* There are no e17 specific atoms defined yet */
/* externally accessible functions */
int
e_atoms_init(void)
{
_e_atom_wm_name = ecore_x_atom_get("WM_NAME");
_e_atom_wm_class = ecore_x_atom_get("WM_CLASS");
_e_atom_wm_hints = ecore_x_atom_get("WM_HINTS");
_e_atom_wm_size_hints = ecore_x_atom_get("WM_SIZE_HINTS");
_e_atom_wm_protocols = ecore_x_atom_get("WM_PROTOCOLS");
_e_atom_wm_icon_name = ecore_x_atom_get("WM_ICON_NAME");
_e_atom_wm_client_machine = ecore_x_atom_get("WM_CLIENT_MACHINE");
_e_atom_motif_wm_hints = ecore_x_atom_get("_MOTIF_WM_HINTS");
_e_atom_netwm_pid = ecore_x_atom_get("_NET_WM_PID");
_e_atom_netwm_desktop = ecore_x_atom_get("_NET_WM_DESKTOP");
return 1;
}

View File

@ -2,16 +2,6 @@
#define E_ATOMS_H
/* atom globals */
extern int _e_atom_wm_name;
extern int _e_atom_wm_class;
extern int _e_atom_wm_hints;
extern int _e_atom_wm_size_hints;
extern int _e_atom_wm_protocols;
extern int _e_atom_wm_icon_name;
extern int _e_atom_wm_client_machine;
extern int _e_atom_motif_wm_hints;
extern int _e_atom_netwm_pid;
extern int _e_atom_netwm_desktop;
EAPI int e_atoms_init(void);
EAPI int e_atoms_shutdown(void);

View File

@ -1,4 +1,5 @@
#include "e.h"
#include <Ecore_X_Atoms.h>
#define RESIZE_NONE 0
#define RESIZE_TL 1
@ -661,52 +662,52 @@ _e_border_cb_window_property(void *data, int ev_type, void *ev)
printf("property for %0x [%s]\n", e->win, name);
XFree(name);
}
if (e->atom == _e_atom_wm_name)
if (e->atom == ECORE_X_ATOM_WM_NAME)
{
bd->client.icccm.fetch.title = 1;
bd->changed = 1;
}
else if (e->atom == _e_atom_wm_class)
else if (e->atom == ECORE_X_ATOM_WM_CLASS)
{
bd->client.icccm.fetch.name_class = 1;
bd->changed = 1;
}
else if (e->atom == _e_atom_wm_icon_name)
else if (e->atom == ECORE_X_ATOM_WM_ICON_NAME)
{
bd->client.icccm.fetch.icon_name = 1;
bd->changed = 1;
}
else if (e->atom == _e_atom_wm_client_machine)
else if (e->atom == ECORE_X_ATOM_WM_CLIENT_MACHINE)
{
bd->client.icccm.fetch.machine = 1;
bd->changed = 1;
}
else if (e->atom == _e_atom_wm_protocols)
else if (e->atom == ECORE_X_ATOM_WM_PROTOCOLS)
{
bd->client.icccm.fetch.protocol = 1;
bd->changed = 1;
}
else if (e->atom == _e_atom_wm_hints)
else if (e->atom == ECORE_X_ATOM_WM_HINTS)
{
bd->client.icccm.fetch.hints = 1;
bd->changed = 1;
}
else if (e->atom == _e_atom_wm_size_hints)
else if (e->atom == ECORE_X_ATOM_WM_NORMAL_HINTS)
{
bd->client.icccm.fetch.size_pos_hints = 1;
bd->changed = 1;
}
else if (e->atom == _e_atom_wm_hints)
else if (e->atom == ECORE_X_ATOM_MOTIF_WM_HINTS)
{
bd->client.mwm.fetch.hints = 1;
bd->changed = 1;
}
else if (e->atom == _e_atom_netwm_pid)
else if (e->atom == ECORE_X_ATOM_NET_WM_PID)
{
bd->client.netwm.fetch.pid = 1;
bd->changed = 1;
}
else if (e->atom == _e_atom_netwm_desktop)
else if (e->atom == ECORE_X_ATOM_NET_WM_DESKTOP)
{
bd->client.netwm.fetch.desktop = 1;
bd->changed = 1;