diff --git a/src/bin/e_alert_main.c b/src/bin/e_alert_main.c index 5e4112e51..0df5c825c 100644 --- a/src/bin/e_alert_main.c +++ b/src/bin/e_alert_main.c @@ -200,8 +200,8 @@ _e_alert_comp_win_get(void) xcb_get_property_cookie_t cookie; xcb_get_property_reply_t *reply; uint32_t *v; - int r; int atom_cardinal, atom_composite_win; + int r; atom_cardinal = _e_alert_atom_get("CARDINAL"); atom_composite_win = _e_alert_atom_get("_E_COMP_WINDOW"); @@ -218,6 +218,30 @@ _e_alert_comp_win_get(void) 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 _e_alert_display(void) { @@ -226,6 +250,8 @@ _e_alert_display(void) xcb_query_text_extents_reply_t *reply; int x = 0, w = 0; + tainted = _e_alert_root_tainted_get(); + str = _e_alert_build_string(title); cookie = @@ -501,15 +527,16 @@ _e_alert_draw_text(void) "restart to try and get your desktop back the way \n" "it was.\n" "\n" - "Please compile everything with -g in your CFLAGS.", pid); + "Please compile everything with -g in your CFLAGS.\n", pid); } else { snprintf(msg, sizeof(msg), - "This is not meant to happen and is likely a sign of \n" - "a bug, but you are using non supported modules. Before\n" - "reporting this issue, please unload them and try to see\n" - "if the bug is still there.\n"); + "This is not meant to happen and is likely\n" + "a sign of a bug, but you are using non supported\n" + "modules. Before reporting this issue, please\n" + "unload them and try to see if the bug is still\n" + "there.\n"); } strcpy(warn, ""); @@ -525,7 +552,7 @@ _e_alert_draw_text(void) xcb_image_text_8(conn, strlen(warn), win, gc, 4, (k + fa), warn); k += (2 * (fh + 2)); - while (msg[i]) + for (i = 0; msg[i]; ) { line[j++] = msg[i++]; if (line[j - 1] == '\n') diff --git a/src/bin/e_module.c b/src/bin/e_module.c index 6096e2387..85787f747 100644 --- a/src/bin/e_module.c +++ b/src/bin/e_module.c @@ -738,8 +738,20 @@ _e_module_whitelist_check(void) 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) {