forked from enlightenment/enlightenment
parent
0ce293352e
commit
3db4f3b65a
|
@ -19,17 +19,31 @@ EAPI Ecore_X_Atom E_ATOM_WINDOW_STATE_CENTERED = 0;
|
|||
EAPI int
|
||||
e_atoms_init(void)
|
||||
{
|
||||
E_ATOM_MANAGED = ecore_x_atom_get("__E_WINDOW_MANAGED");
|
||||
E_ATOM_CONTAINER = ecore_x_atom_get("__E_WINDOW_CONTAINER");
|
||||
E_ATOM_ZONE = ecore_x_atom_get("__E_WINDOW_ZONE");
|
||||
E_ATOM_DESK = ecore_x_atom_get("__E_WINDOW_DESK");
|
||||
E_ATOM_MAPPED = ecore_x_atom_get("__E_WINDOW_MAPPED");
|
||||
E_ATOM_SHADE_DIRECTION = ecore_x_atom_get("__E_WINDOW_SHADE_DIRECTION");
|
||||
E_ATOM_HIDDEN = ecore_x_atom_get("__E_WINDOW_HIDDEN");
|
||||
E_ATOM_BORDER_SIZE = ecore_x_atom_get("__E_WINDOW_BORDER_SIZE");
|
||||
E_ATOM_WINDOW_STATE = ecore_x_atom_get("__E_ATOM_WINDOW_STATE");
|
||||
E_ATOM_WINDOW_STATE_CENTERED = ecore_x_atom_get("__E_ATOM_WINDOW_STATE_CENTERED");
|
||||
const char *atom_names[] = {
|
||||
"__E_WINDOW_MANAGED",
|
||||
"__E_WINDOW_CONTAINER",
|
||||
"__E_WINDOW_ZONE",
|
||||
"__E_WINDOW_DESK",
|
||||
"__E_WINDOW_MAPPED",
|
||||
"__E_WINDOW_SHADE_DIRECTION",
|
||||
"__E_WINDOW_HIDDEN",
|
||||
"__E_WINDOW_BORDER_SIZE",
|
||||
"__E_ATOM_WINDOW_STATE",
|
||||
"__E_ATOM_WINDOW_STATE_CENTERED"
|
||||
};
|
||||
Ecore_X_Atom atoms[10];
|
||||
|
||||
ecore_x_atoms_get(atom_names, 10, atoms);
|
||||
E_ATOM_MANAGED = atoms[0];
|
||||
E_ATOM_CONTAINER = atoms[1];
|
||||
E_ATOM_ZONE = atoms[2];
|
||||
E_ATOM_DESK = atoms[3];
|
||||
E_ATOM_MAPPED = atoms[4];
|
||||
E_ATOM_SHADE_DIRECTION = atoms[5];
|
||||
E_ATOM_HIDDEN = atoms[6];
|
||||
E_ATOM_BORDER_SIZE = atoms[7];
|
||||
E_ATOM_WINDOW_STATE = atoms[8];
|
||||
E_ATOM_WINDOW_STATE_CENTERED = atoms[9];
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,14 +6,31 @@
|
|||
Ecore_X_Atom _QTOPIA_SOFT_MENU = 0;
|
||||
Ecore_X_Atom _QTOPIA_SOFT_MENUS = 0;
|
||||
|
||||
static Ecore_X_Atom gnome_atom = 0;
|
||||
static Ecore_X_Atom enlightenment_comms = 0;
|
||||
static Ecore_X_Atom enlightenment_version = 0;
|
||||
|
||||
EAPI void
|
||||
e_hints_init(void)
|
||||
{
|
||||
Ecore_X_Window *roots = NULL;
|
||||
int num;
|
||||
const char *atom_names[] = {
|
||||
"_QTOPIA_SOFT_MENU",
|
||||
"_QTOPIA_SOFT_MENUS",
|
||||
"GNOME_SM_PROXY",
|
||||
"ENLIGHTENMENT_COMMS",
|
||||
"ENLIGHTENMENT_VERSION"
|
||||
};
|
||||
Ecore_X_Atom atoms[5];
|
||||
|
||||
ecore_x_atoms_get(atom_names, 5, atoms);
|
||||
_QTOPIA_SOFT_MENU = atoms[0];
|
||||
_QTOPIA_SOFT_MENUS = atoms[1];
|
||||
gnome_atom = atoms[2];
|
||||
enlightenment_comms = atoms[3];
|
||||
enlightenment_version = atoms[4];
|
||||
|
||||
_QTOPIA_SOFT_MENU = ecore_x_atom_get("_QTOPIA_SOFT_MENU");
|
||||
_QTOPIA_SOFT_MENUS = ecore_x_atom_get("_QTOPIA_SOFT_MENUS");
|
||||
roots = ecore_x_window_root_list(&num);
|
||||
if (roots)
|
||||
{
|
||||
|
@ -173,24 +190,19 @@ EAPI void
|
|||
e_hints_e16_comms_pretend(E_Manager *man)
|
||||
{
|
||||
Ecore_X_Window win;
|
||||
Ecore_X_Atom enlightenment_comms, enlightenment_version, string;
|
||||
char buf[256];
|
||||
|
||||
enlightenment_comms = ecore_x_atom_get("ENLIGHTENMENT_COMMS");
|
||||
enlightenment_version = ecore_x_atom_get("ENLIGHTENMENT_VERSION");
|
||||
string = ecore_x_atom_get("STRING");
|
||||
|
||||
win = ecore_x_window_input_new(man->root, -100, -100, 1, 1);
|
||||
|
||||
/* to help detect this is NOT e16 */
|
||||
snprintf(buf, sizeof(buf), "Enlightenment %s", VERSION);
|
||||
ecore_x_window_prop_property_set(win, enlightenment_version, string, 8, buf, strlen(buf));
|
||||
ecore_x_window_prop_property_set(man->root, enlightenment_version, string, 8, buf, strlen(buf));
|
||||
ecore_x_window_prop_property_set(win, enlightenment_version, ECORE_X_ATOM_STRING, 8, buf, strlen(buf));
|
||||
ecore_x_window_prop_property_set(man->root, enlightenment_version, ECORE_X_ATOM_STRING, 8, buf, strlen(buf));
|
||||
|
||||
snprintf(buf, sizeof(buf), "WINID %8x", (int)win);
|
||||
ecore_x_window_prop_property_set(win, enlightenment_comms, string, 8, buf, 14);
|
||||
ecore_x_window_prop_property_set(win, enlightenment_comms, ECORE_X_ATOM_STRING, 8, buf, 14);
|
||||
|
||||
ecore_x_window_prop_property_set(man->root, enlightenment_comms, string, 8, buf, 14);
|
||||
ecore_x_window_prop_property_set(man->root, enlightenment_comms, ECORE_X_ATOM_STRING, 8, buf, 14);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -1370,12 +1382,9 @@ e_hints_window_qtopia_soft_menus_get(E_Border *bd)
|
|||
EAPI void
|
||||
e_hints_openoffice_gnome_fake(Ecore_X_Window root)
|
||||
{
|
||||
Ecore_X_Atom gnome_atom, string_atom;
|
||||
const char *string = "GNOME_SM_PROXY";
|
||||
|
||||
gnome_atom = ecore_x_atom_get("GNOME_SM_PROXY");
|
||||
string_atom = ecore_x_atom_get("STRING");
|
||||
ecore_x_window_prop_property_set(root, gnome_atom, string_atom,
|
||||
ecore_x_window_prop_property_set(root, gnome_atom, ECORE_X_ATOM_STRING,
|
||||
8, (void *)string, strlen(string));
|
||||
}
|
||||
|
||||
|
|
|
@ -163,15 +163,23 @@ e_manager_manage_windows(E_Manager *man)
|
|||
if (windows)
|
||||
{
|
||||
int i;
|
||||
const char *atom_names[] =
|
||||
{
|
||||
"_XEMBED_INFO",
|
||||
"_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR",
|
||||
"KWM_DOCKWINDOW"
|
||||
};
|
||||
Ecore_X_Atom atoms[3];
|
||||
Ecore_X_Atom atom_xmbed, atom_kde_netwm_systray, atom_kwm_dockwindow,
|
||||
atom_window;
|
||||
unsigned char *data = NULL;
|
||||
int count;
|
||||
|
||||
atom_window = ecore_x_atom_get("WINDOW");
|
||||
atom_xmbed = ecore_x_atom_get("_XEMBED_INFO");
|
||||
atom_kde_netwm_systray = ecore_x_atom_get("_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR");
|
||||
atom_kwm_dockwindow = ecore_x_atom_get("KWM_DOCKWINDOW");
|
||||
atom_window = ECORE_X_ATOM_WINDOW;
|
||||
ecore_x_atoms_get(atom_names, 3, atoms);
|
||||
atom_xmbed = atoms[0];
|
||||
atom_kde_netwm_systray = atoms[1];
|
||||
atom_kwm_dockwindow = atoms[2];
|
||||
for (i = 0; i < wnum; i++)
|
||||
{
|
||||
Ecore_X_Window_Attributes att;
|
||||
|
|
Loading…
Reference in New Issue