forked from enlightenment/enlightenment
e: use X property for E_TAINTED to and fix parsing of message to.
SVN revision: 78694
This commit is contained in:
parent
64fc140c78
commit
86d6551006
|
@ -200,8 +200,8 @@ _e_alert_comp_win_get(void)
|
||||||
xcb_get_property_cookie_t cookie;
|
xcb_get_property_cookie_t cookie;
|
||||||
xcb_get_property_reply_t *reply;
|
xcb_get_property_reply_t *reply;
|
||||||
uint32_t *v;
|
uint32_t *v;
|
||||||
int r;
|
|
||||||
int atom_cardinal, atom_composite_win;
|
int atom_cardinal, atom_composite_win;
|
||||||
|
int r;
|
||||||
|
|
||||||
atom_cardinal = _e_alert_atom_get("CARDINAL");
|
atom_cardinal = _e_alert_atom_get("CARDINAL");
|
||||||
atom_composite_win = _e_alert_atom_get("_E_COMP_WINDOW");
|
atom_composite_win = _e_alert_atom_get("_E_COMP_WINDOW");
|
||||||
|
@ -218,6 +218,30 @@ _e_alert_comp_win_get(void)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_e_alert_root_tainted_get(void)
|
||||||
|
{
|
||||||
|
xcb_get_property_cookie_t cookie;
|
||||||
|
xcb_get_property_reply_t *reply;
|
||||||
|
uint32_t *v;
|
||||||
|
int atom_cardinal, atom_tainted;
|
||||||
|
int r;
|
||||||
|
|
||||||
|
atom_cardinal = _e_alert_atom_get("CARDINAL");
|
||||||
|
atom_tainted = _e_alert_atom_get("_E_TAINTED");
|
||||||
|
|
||||||
|
cookie = xcb_get_property_unchecked(conn, 0, screen->root, atom_tainted,
|
||||||
|
atom_cardinal, 0, 0x7fffffff);
|
||||||
|
reply = xcb_get_property_reply(conn, cookie, NULL);
|
||||||
|
if (!reply) return EINA_TRUE;
|
||||||
|
|
||||||
|
v = xcb_get_property_value(reply);
|
||||||
|
r = v[0];
|
||||||
|
|
||||||
|
free(reply);
|
||||||
|
return !!r;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_alert_display(void)
|
_e_alert_display(void)
|
||||||
{
|
{
|
||||||
|
@ -226,6 +250,8 @@ _e_alert_display(void)
|
||||||
xcb_query_text_extents_reply_t *reply;
|
xcb_query_text_extents_reply_t *reply;
|
||||||
int x = 0, w = 0;
|
int x = 0, w = 0;
|
||||||
|
|
||||||
|
tainted = _e_alert_root_tainted_get();
|
||||||
|
|
||||||
str = _e_alert_build_string(title);
|
str = _e_alert_build_string(title);
|
||||||
|
|
||||||
cookie =
|
cookie =
|
||||||
|
@ -501,15 +527,16 @@ _e_alert_draw_text(void)
|
||||||
"restart to try and get your desktop back the way \n"
|
"restart to try and get your desktop back the way \n"
|
||||||
"it was.\n"
|
"it was.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Please compile everything with -g in your CFLAGS.", pid);
|
"Please compile everything with -g in your CFLAGS.\n", pid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
snprintf(msg, sizeof(msg),
|
snprintf(msg, sizeof(msg),
|
||||||
"This is not meant to happen and is likely a sign of \n"
|
"This is not meant to happen and is likely\n"
|
||||||
"a bug, but you are using non supported modules. Before\n"
|
"a sign of a bug, but you are using non supported\n"
|
||||||
"reporting this issue, please unload them and try to see\n"
|
"modules. Before reporting this issue, please\n"
|
||||||
"if the bug is still there.\n");
|
"unload them and try to see if the bug is still\n"
|
||||||
|
"there.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(warn, "");
|
strcpy(warn, "");
|
||||||
|
@ -525,7 +552,7 @@ _e_alert_draw_text(void)
|
||||||
xcb_image_text_8(conn, strlen(warn), win, gc,
|
xcb_image_text_8(conn, strlen(warn), win, gc,
|
||||||
4, (k + fa), warn);
|
4, (k + fa), warn);
|
||||||
k += (2 * (fh + 2));
|
k += (2 * (fh + 2));
|
||||||
while (msg[i])
|
for (i = 0; msg[i]; )
|
||||||
{
|
{
|
||||||
line[j++] = msg[i++];
|
line[j++] = msg[i++];
|
||||||
if (line[j - 1] == '\n')
|
if (line[j - 1] == '\n')
|
||||||
|
|
|
@ -738,8 +738,20 @@ _e_module_whitelist_check(void)
|
||||||
known++;
|
known++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (badl) e_env_set("E17_TAINTED", "YES");
|
{
|
||||||
else e_env_set("E17_TAINTED", "NO");
|
Ecore_X_Atom _x_tainted;
|
||||||
|
char *state;
|
||||||
|
unsigned int _e_tainted;
|
||||||
|
|
||||||
|
state = badl ? "YES" : "NO";
|
||||||
|
_e_tainted = badl ? 1 : 0;
|
||||||
|
|
||||||
|
_x_tainted = ecore_x_atom_get("_E_TAINTED");
|
||||||
|
ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
|
||||||
|
_x_tainted, &_e_tainted, 1);
|
||||||
|
|
||||||
|
e_env_set("E17_TAINTED", state);
|
||||||
|
}
|
||||||
|
|
||||||
if (eina_list_count(badl) != known)
|
if (eina_list_count(badl) != known)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue