summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-10-30 12:29:01 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-10-30 12:30:50 +0000
commit8167d4e02dd1a1cd2d1b276a465160d15990c12f (patch)
tree98b9bf1faa0edaf692d740423a95387977eb9fb9
parent4852760c8e6132db8d9a41036cc85b86246684a9 (diff)
acpi - delay missing acpid dialog until after we've started upenlightenment-0.23
with a timer it'll wait untuil after mainloop is running before it times out and thus shows the dialog ensuring it appears once the compositor is fully up. this should avoid weird sized windows. @fix
-rw-r--r--src/bin/e_acpi.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/bin/e_acpi.c b/src/bin/e_acpi.c
index f98890985..39d2bba0c 100644
--- a/src/bin/e_acpi.c
+++ b/src/bin/e_acpi.c
@@ -125,6 +125,18 @@ static E_ACPI_Device_Multiplexed _devices_multiplexed[] =
125/* public variables */ 125/* public variables */
126E_API int E_EVENT_ACPI = 0; 126E_API int E_EVENT_ACPI = 0;
127 127
128static Eina_Bool
129_acpi_error_cb(void *data EINA_UNUSED)
130{
131 e_util_dialog_show
132 (_("ACPI Error"),
133 _("You seem to have an ACPI based system, but<br>"
134 "<hilight>acpid</hilight> does not seem to be running or<br>"
135 "contactable. Perhaps enable the <hilight>acpid</hilight><br>"
136 "service on your system?"));
137 return EINA_FALSE;
138}
139
128/* public functions */ 140/* public functions */
129EINTERN int 141EINTERN int
130e_acpi_init(void) 142e_acpi_init(void)
@@ -135,11 +147,7 @@ e_acpi_init(void)
135 if (!ecore_file_exists("/var/run/acpid.socket")) 147 if (!ecore_file_exists("/var/run/acpid.socket"))
136 { 148 {
137 if (ecore_file_exists("/proc/acpi")) 149 if (ecore_file_exists("/proc/acpi"))
138 e_util_dialog_show(_("Error"), 150 ecore_timer_add(5.0, _acpi_error_cb, NULL);
139 _("You seem to have an ACPI based system, but<br>"
140 "<hilight>acpid</hilight> does not seem to be running or<br>"
141 "contactable. Perhaps enable the <hilight>acpid</hilight><br>"
142 "service on your system?"));
143 return 1; 151 return 1;
144 } 152 }
145 153