Commit Graph

515 Commits

Author SHA1 Message Date
Carsten Haitzler 15a5a49835 e main - use exit code 111 to have e_start parent process restart e
this means no leaked fd's between restarts too. cleaner. it also
encorces "die with parent" for enlightenment_start too as another
bonus in addition to its own fifo handling for singleton access per uid.

WARNING: you need to log out and log back in since the "protocol
expectations" (what exit codes do what and what parent and child
process are responsible for) changed so to get them both back in sync
you need to log out and in.
2020-01-15 11:33:55 +00:00
Carsten Haitzler f57572b678 e system - add new uber setuid tool to replace all the previous ones
so e has had a bit of a mess of setuid root tools to do things that
are essential to maintaing a functioning desktop/laptop/tablet/phone
like device like shutting it down or suspending or sqizzling the cpu
governor or messing with the backlight or... you get the idea.

this has been spread around enlightenment_sys and other special
purpose tools. this now unifies it into a single "always there"
enlightenment_system backend setuid root slave process whose job it is
to do all these things via a stdio protocol in an organized way. this
means latency to do something is lower, but at the expense of
consuming ram and a lurking process. unfortunately the lurking will be
needed soon when i add ddc support to make it even vaguely efficient,
so it's a cost i guess we have to pay now. we'll need this in future
as well for some stats collection and more.

still need to port existing code to use this instead of the existing stuff,
and then remove of the old stuff.
2020-01-15 11:33:49 +00:00
Carsten Haitzler 34a427e2a1 e init splash - remove almost all status strings as they are not needed
since now we basically bring everything up THEN start rendering once
we hit the main loop there is no point having init splash strings
anymore. it is no longer an external process. until e's compositor is
up you will see nothing anyway. if it is up these days we've finished
init as a smoothing out of startup has move everything before main
loop starts. so this code is all kind of useless, thus remove. cleanup
code.
2019-10-14 22:59:37 +01:00
Carsten Haitzler b8afba1e49 startup smoothing - smoothen startup with preload and defer to loop start
this moves a bunch of things that were being don after loop starts to
before so they don't interrupt framerate as well as launch a thread
that preloads file(s) - for now just edj theme files so stuff is
pre-cached by the time loop starts later so we don't stall s much
leading to smoother startup/fade in and better framerate. it's really
visible (especially on my rpi3).
2019-09-14 18:47:20 +01:00
Carsten Haitzler 0d00264ca6 e desklock - only stay locked first restart after crash if locked 2019-09-11 15:22:55 +01:00
Carsten Haitzler b4cfada8e8 module and config - remove pointless config vars that have no use
we dont need to delay module loading anymore so remove allof this -
priority too shouldn't be necessary as well and was just a workaround.
this remvoes all of that removing some e module api's and module
struct members as well as some global config fields. it also ensures
all config files are up to date as well.
2019-09-10 17:58:30 +01:00
Carsten Haitzler da4db1a29c e - support new statgen feature and turn it on for e
use the env var as this is "soft" and will do nothing if efl doesn't
have this... but it's worth it if it does.
2019-07-28 10:26:46 +01:00
Carsten Haitzler 9432836d30 e wl halt/reboot/logout restart fix - dont restart
so when e was e.g. shutting down the system it'd sometimes - or all
the time, restart and not shut down. this fixes that. e was being sent
a HUP signal while doing this causing e to go "ooh HUP - i shall
restart" which si what daemons without a controlling tty do with
signals commonly. this isn't what we want from e though in this case,
so delay itby a bit and ignore if we're in the process of logging
out/halting etc.

this really only affects wayland mode.

@fix
2019-06-04 11:58:46 +01:00
Carsten Haitzler 27c3b0e940 warn - make buffer bigger to avoid trunc warn 2019-01-12 01:51:43 +00:00
Alastair Poole a19c968973 e_main: initialise XDG environment earlier.
Summary:
Moving _xdg_data_dirs_augment call to earlier in
initalisation process. Currently first-run will
leave XDG_MENU_PREFIX broken, thus the application
menu will be empty in E.

Seems eio_init might be the culprit.

Moved to above eio_init.

Test Plan:
* Launch E from X from a console (startx)
* Check application menu (empty).
* Apply patch.
* Launch E from X from a console (startx)
* E's Application menu should be populated.

Related to https://phab.enlightenment.org/D7534

Reviewers: #committers, raster, cedric, zmike, devilhorns

Reviewed By: #committers, zmike

Tags: #enlightenment-git

Differential Revision: https://phab.enlightenment.org/D7535
2019-01-03 18:37:30 +00:00
Carsten Haitzler cbe3858b15 desklock - add explicit manually invoked api and a blocking api
this is so parts of e (moduels etc.) could block a lock for some
reason and differentiate between an automatic lock and a manually
invoked one.
2018-12-15 16:13:28 +00:00
Carsten Haitzler 851acc7ff7 desklock - pass lock state info to e_start to lock on crash restart
is e crashes, catches it and restarts while locked you end up
unlocked. this lets enlightenment_start know this lock down state and
it sets an env var to ensure locking happens on restart after recovery.
2018-03-23 17:18:00 +09:00
Mike Blumenkrantz b950ae8020 remove adding theme extension for "default" theme on startup
elm_theme does this automatically so there should never be a need for it
2018-02-27 17:41:01 -05:00
Mike Blumenkrantz ed361340d7 don't require E_START env var to be set when running on valgrind
make manually valgrinding easier
2018-02-06 11:17:26 -05:00
Carsten Haitzler d73d902292 init anim - fix sudden vanish of init splash in some cases
this seems to happen to @manmower in T6619. it may just be timing
changes that changed the start loop time to be at init of ecore maybe ...
but it was doing a forced hide and not a clean "done"
that animates/fades. so fix this along with deferring show until the
first render pre.

this fixes T6619
2018-01-17 18:14:29 +09:00
Carsten Haitzler 3daf3ac456 e main - xdg runtime dir fixup - dont overwrite same buffer
this path i never saw triggered before on linux because xdg runtime
dir is set... but if it isn't... dont mess up the runtime dir path

@fix
2017-10-28 23:43:50 +09:00
Derek Foreman a85a602a39 Revert "Set close on exec for stdin"
This reverts commit 40e8bb044c.

EFL master solves this properly
EFL stable currently has a bug that solves this accidentally

so there's a window of about 3 commits in git where it's a problem,
and nobody should run those commits in production :)

This fix caused some problems when restarting E, as stdin would
cloexec and then the following startup would try to set cloexec
on an invalid fd and generate an err that generated a cri because
of an invalid log domain.

Someone should probably figure out the log domain thing.
2017-09-26 14:19:24 -05:00
Derek Foreman 40e8bb044c Set close on exec for stdin
ref T5606
2017-09-22 21:02:32 -05:00
Mike Blumenkrantz c31cb51499 replace <br> with <ps/> for all text 2017-08-21 10:16:35 -04:00
Carsten Haitzler 03aeb1d463 fix fallthrough warnings 2017-08-04 12:35:27 +09:00
Carsten Haitzler d870549c0f e - fix eet image format test to actually use key when loading
fix complaint from eet format test ... was failing because we didnt
use a key

@fix
2017-07-30 22:55:19 +09:00
Mike Blumenkrantz 4ec22df15f check for different types of load errors during startup image load tests
in the case where files are not found (possibly not installed/corrupted),
attempt to continue starting and not brick a running session
2017-07-20 17:18:33 -04:00
Mike Blumenkrantz 74613ff0fd only set qt theme override env vars if option to do theme matching is enabled 2017-07-14 18:40:50 -04:00
Carsten Haitzler f43d2b881c e blanking - add new special "locked timeout" that can be shorter
this allows you to have a different timeout when locked thats much
shorter to save screen/power more unless you log in.

@feature
2017-07-14 09:43:29 +09:00
Carsten Haitzler 69f757edad further fixes to screensaver/banking with window states like fullscreen
this is a further fix for T5464 to actually make the intended option
work at all. what was there was broken. now it works. init order was
wrong - screensaver was relying on event id's from e_client socde that
were not initted yet AND the handlers didnt account for "dont blank
when fullscreen window is there" at all. @fix
2017-05-07 14:35:14 +09:00
Mike Blumenkrantz cfc538ca55 remove all unnecessary efl version checks
the version of efl required by configure is already higher than these checks
2017-02-24 14:15:38 -05:00
Mike Blumenkrantz e39b6601b0 make 'after_restart' variable global
this allows the compositor to detect (accurately) whether it is a new
instance
2017-02-24 14:15:38 -05:00
Derek Foreman 73aecd73ab Replace all timer_add with timer_loop_add
So yeah, I've literally used sed to replace every occurrence of
ecore_time_add() with ecore_timer_loop_add() because I'm reasonably
confident that no part of E has a legitimate need for timer based on the
exact current time.

It would be really nice if I'm not wrong. :)

The reason for this is the incredible spew of clock_gettime() calls I'm
seeing on an ARM system (that should have a vdso for gettime, but...)
This can amount to thousands of system calls per second.

 #YOLO
2017-02-03 15:52:28 -06:00
Mike Blumenkrantz 30b25f16d1 remove extra SLEEP prints during startup on non-release builds
this was useful for startup profiling, but there are better methods available now

partially reverts 2850c28167
2016-12-19 10:59:14 -05:00
Michaël Bouchaud (yoz) 06ea6cadbd E_Client: add an abstraction api to control volume by app
This api give the possibility to add sink to an E_Client and control the volume
or the mute state of the sinks associated with this E_Client.

@features
2016-10-27 21:54:39 +02:00
Simon Lees (SUSE) 98f5c62291 Also set QT_STYLE_OVERRIDE
Qt 5.7 has introduced an extra enviornment var for getting Qt/KDE
apps to follow gtk theming so we will export that alongside the
one that we already support.

Thanks to AJSlye for finding reporting and figuring this out.
2016-09-13 13:54:11 +09:30
Carsten Haitzler 796f50820a askpass env var - dont use 32byte buffer for path but use stringshare
use stringshare to have no limit on askpass path.
2016-08-16 16:16:05 +09:00
Carsten Haitzler 18aab4be01 e askpass - also set SSH_ASKPASS like with sudo
this means that is ssh runs with no tty/terminal available then it can
ask for a password with the same gui as for sudo that e provides.
2016-08-16 16:01:57 +09:00
Carsten Haitzler 8d780c7fb5 e sudo gui support - add askpass util for sudo askpass support
this gives e by default sudo gui support with an askpass util that
sudo can use as well as setting the env var correctly so it will be
used by sudo.

@feature
2016-08-13 17:39:17 +09:00
Mike Blumenkrantz 7ebaa1ffb3 make init fail if a dbus session connection cannot be created
typically this indicates a broken session manager or someone trying to run
a wayland session without using dbus-launch
2016-05-09 13:30:40 -04:00
Mike Blumenkrantz ef1772b8cb implement wl client session recovery
another small feature patch brought to you by insomnia

 #SamsungFeatures
2016-05-05 15:47:55 -04:00
Mike Blumenkrantz c3700297d7 remove explicit edje_init/shutdown calls
elm already handles this
2016-04-25 12:55:21 -04:00
Mike Blumenkrantz 536a3a7ff6 make startup/restart app exec timing protocol-specific
this allows different display protocols to start their applications at
different times to ensure that any initialization has completed prior to
starting anything requiring a window

fix T3475
2016-04-18 15:27:47 -04:00
Mike Blumenkrantz 48fbfa2908 reduce efl version req to 1.17.0, make new gadget stuff 1.7.99+ at runtime 2016-04-11 15:15:51 -04:00
Marcel Hollerbach 19db5f256c e_xkb: init before e_comp_wl init
for the case e_xkb gets initialized, we need to init it before ecore_drm
is called, otherwise ecore_drm will create his own context and keymap,
which will be overriden a few moment later when e_xkb is initializied.
So by calling e_comp_wl_input_keymap_set before ecore_drm_init the
correct context and keymap is set and no useless elements are created.

The mainproblem is that the comp_type is set when the compositor is
already running, so we have to pass the type at the init to the e_xkb
to tell for which kind of compositor we are running.
2016-03-24 20:54:03 +01:00
Mike Blumenkrantz 6e032ce35d add bryces: new shelf replacement
see e_bryce.h
2016-03-04 14:23:44 -05:00
Mike Blumenkrantz d26c49b3ce add new gadget system
see e_gadget.h
2016-03-04 14:23:44 -05:00
Mike Blumenkrantz d3fe687ada add a namespaced version of efx
this will eventually be merged into the efl tree but the current release
cycle is not a good time for it
2016-03-04 14:23:44 -05:00
Mike Blumenkrantz a424542459 disable emotion_shutdown during shutdown procedure
this manually iterates main loop and is guaranteed to trigger unexpected
behaviors and/or crashes
2016-02-27 14:19:28 -05:00
Mike Blumenkrantz 493f6f595b Revert "e - restart window positioning - fix it"
This reverts commit d0229b3652.

see following patches
2016-02-08 14:51:21 -05:00
Carsten Haitzler d0229b3652 e - restart window positioning - fix it
so every time i restart e i have my windows all messed up. it's
INSANELY annoying and time consuming every single time having to move
a dozen or more windows back to where they should be just because i
restarted e. i've narrowed it down to 2 places. 1 which is trying to
handle "out of screen" windows and during startup it seems things are
not quite stable yet as the randr code figures things out until the
event storm settles down.

when this is then fixed - another bit of code just shuffles windows up
all the time by a titlebar whcih is also supremely annoying. this is
the code that adopes a new frame for a window.

so the nasty hack to avoid piles of pain right now is for the first 5
seconds of e's life - don't do this stuff. at least you can now use e
and not be annoyed to hell and back every restart.

yes a nicer fix may be better - but that's going to take a lot more
time and patience and until then - this will do.
2016-02-06 11:31:01 +09:00
Mike Blumenkrantz fc6458bccd re-add MANAGER context bindings
these bindings activate before any other handler can process the
corresponding event and will block all propagation of the event upon
activation

as an example, the alt+wheel default binding for flipping desks currently
passes through a number of event handlers prior to activating the binding,
meaning that it's possible for the wheel action to have unwanted effects
when these handlers cause actions before the binding stops the propagation.
using a MANAGER context instead ensures that this is not possible
2016-01-22 12:59:19 -05:00
Marcel Hollerbach b8dd1c5bcd e_main: init e_xkb before e_comp
otherwise e_xkb cannot guess what kind of compositor is running.
2016-01-14 18:37:27 +01:00
Simon Lees 14fdd71765 Set QT_QPA_PLATFORM theme to gtk2
Summary:
@fix the display / customisation of KDE5 apps.
KDE5 applications don't understand anything other then gnome or kde
They expect everyone else to set QT_QPA_PLATFORMTHEME to tell them how
to theme there apps otherwise they use a fallback mode which results in
missing icons and a inability to change the appearance of applications
see https://bugzilla.suse.com/show_bug.cgi?id=920792 for more info.
There are two sensible defaults for this variable, "kde" which will
make apps appear the same as they do if they are run in kde. and gtk2
which will make kde applications follow the gtk/gnome theme, we have
decided on choosing gtk2 as it means that kde/qt apps will follow the
app and icon theme set in the enlightenment settings dialog. Some users
who wish to use Qt apps without any gnome or gtk usage may choose to
install qt5ct and overwrite this variable with qt5ct and use that to
configure there Qt5 applications.

Reviewers: raster, zmike

Subscribers: jeffhoogland, cedric

Differential Revision: https://phab.enlightenment.org/D3498
2015-12-28 11:49:11 -05:00
Mike Blumenkrantz 660c7cb2e5 improve readability of E_FIRST_FRAME environment variable detection
functionality remains the same, but this is more clear for readers
2015-11-12 15:09:29 -05:00