at present, this value will be set to either TYPE_NONE if no valid
compositor has been created or TYPE_X if running a wl compositor inside
an x11 compositor
This "should" fix T2344 crashing, however I suppose a better question
is ... why is e_client_new returning NULL when it Does find the client
already in the hash...
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
PAM on FreeBSD, unlike on Linux, does not allow users to check their own
password. Instead, we need a suid helper to do it for us. Add such a
helper on FreeBSD.
For now, it is limited to checking users in the local password database
(traditional Unix passwd file). This could and should be extended to use
PAM in a later patch.
Test Plan:
Tested empty pw, wrong pw, correct pw at lock screen; observed correct behavior
in each instance.
Reviewers: q66, zmike
Reviewed By: q66, zmike
Subscribers: cedric, seoz
Differential Revision: https://phab.enlightenment.org/D2355
Optimising compilers (like gcc/clang with -O1 or above) were optimising
out the memset(). Until link time optimisations are good enough, this
will prevent them from doing so. The best solution would be to use
memset_s() (c11), though it's not readily available yet. This is the
first step towards using memset_s() with a fallback for systems who
don't have it. A better solution, is to put it in Eina, to prevent LTO
completely. This will have to be done after the EFL release.
Even this is not entirely safe though, but at least it protects us from
some memory disclosure issues.
This doesn't solve the fact that we may store a copy of the password in
other places, like the input system. We need to address that too.
Thanks to Matthew Garrett for pointing this out or Twitter.
delfn's on desks being referred to as profile.wait_desk were never
cleared when client was freed. als the desk itself never got an obj
reference - fix that and ref/unref it.
Summary:
_e_elm_win_trap_show() treats Ecore_Window as a 64bit data type when
it's actually the same size as the system's pointer type.
#24HourFullPowerNoToiletNoShower
Reviewers: devilhorns, zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2388
fix T2194
sometimes while quickly moving the cursor through menu items with submenus
the visibility flag would toggle more quickly than the menu object's visibility.
this is no longer the case
Summary:
EINA_UNUSED is defined in Eina. Since we are not using the program at all,
let's void main()'s arguments instead of trying to ignore them.
Test Plan: tested only on OSX, unbreaks the build.
Reviewers: zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2387
Summary:
Unconditionally build the suid-helper _backlight program; conditionalize
behavior on Eeze, FreeBSD (doing nothing on neither). Add logic to set
the FreeBSD sysctl in a similar manner to udev devices on Linux.
Add _bl_sys_find/_get helpers for FreeBSD that check for and consult the
video ACPI sysctl.
Test Plan:
Seems to work okay on my laptop (with EINA_CPU_FAKE=1 to workaround a threadq
race that I believe is unrelated -- T2287).
Reviewers: zmike, q66
Reviewed By: q66
Subscribers: cedric, seoz
Differential Revision: https://phab.enlightenment.org/D2337
fixes issues where a new child added would appear above other child objects
if the new child was meant to be stacked below other children
mostly noticeable in deskmirror
this will allow all colorclasses present in the current theme to be edited
instead of only the hardcoded ones in the module. it will also require
completely new translations, for which translators will need to read the edc
files of the default theme (cleverly located in another repo) and provide
translations to the _translate() callback in the theme module
the editor currently lacks indicators for active/type on the colorclass
list, but this can be added in time. meanwhile, a large amount of code is
no longer duplicated or maintained in this repo
fix lack of lost windows submenu. no - windows menu does not handle
it. lost windows lists windows that are LOST - out of screen bounds.
this happens a lot with some apps asking to be placed out of bounds
for whatever silly reasons they have. you literally cannot get these
windows back without this menu. bring it back!
@fix
Summary:
We now have a subset of that functionality in e_comp_wl_input.c, so use
that function instead. The missing bits are moved into the one remaining
caller.
Reviewers: zmike, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2207
Summary:
Now when a client gets the keyboard global it will immediately be sent
a keyboard enter event if appropriate.
Reviewers: zmike, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2206
Summary:
The only use for this was sending keyboard enter events on first commit
after a focus during app startup, and this has proven to be unreliable.
NOTE: Focus before an app requests the keyboard global is now broken and
will be fixed in a following patch.
Reviewers: zmike, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2205
Summary:
Apparently negative values mean "pick a size", though this is
undocumented.
Reviewers: devilhorns, zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2191
Summary:
When enlightenment is working as wayland display server, enlightenment
changes KDSETMODE to KD_GRAPHICS in _ecore_drm_tty_setup(). However,
when enlightenment is killed by SIGSEGV, it doesn't changes KDSETMODE
to KD_TEXT because englightenment process doesn't call ecore_drm_tty_close().
When enlightenment is killed by SIGSEGV, it should get drm devices with
ecore_drm_device_get_list(), and will call ecore_drm_launcher_disconnect(),
and ecore_drm_launcher_disconnect will call ecore_drm_tty_close() internally.
Change-Id: I425488eb4489709cc968b77bd4bc48a4aa4ae30c
Reviewers: zmike, cedric, raster, gwanglim, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2160
Summary:
e_comp_wl_output_init will fail (silently) under a couple of
conditions. Instead, make it propagate the error so it can be handled
at a higher level. For now just issue an error message.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewers: cedric, devilhorns, zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2155
moderately certain I originally wrote this to work in the other direction
and then failed to remove it when I switched to setting parents instead of
children. regardless, pixmap hash should not be changed here
Summary:
wl_array_add() returns NULL if it can't malloc/realloc. This
is probably unlikely but check for it and issue a meaningful error if it
occurs.
Reviewers: cedric, devilhorns, zmike, raster
Reviewed By: raster
Subscribers: raster, cedric
Differential Revision: https://phab.enlightenment.org/D2054
Summary:
If we don't update the modifiers on focus in we can end up with stuck
modifiers if a modifier is held when starting a client.
Reviewers: zmike, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2124
Summary:
Separate the state serialization from the send so we can use the
serialization function elsewhere.
Reviewers: zmike, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2123
Summary:
We still update the keyboard array. focus_in adds everything in the
array to xkbstate anyway, so adding it when there's no focus results
in a double update of state and potentially stuck modifiers.
Reviewers: zmike, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2111
Summary:
We still need to remove the active keys when focus_out happens, even
if the pixmap is already gone. If we don't and a modifier was held
down during exit then the xkb state will have that modifier stuck
forever.
Reviewers: zmike, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2110
Wayland shm sets up a sigbus handler for catching invalid shm region
access. If we setup our sigbus handler here, then the wl-shm sigbus
handler will not function properly
Signed-off-by: Chris Michael <cp.michael@samsung.com>
the calculated values here seem to not be sufficiently accurate to manage a calculated resize.
instead, calc relative pointer coords and send them
#barrel
Summary:
By default the E_NEW() will create our output objects with a 0.0 scale,
which doesn't make any sense and if anything will lead to crashes.
Instead use a scale factor of 1.0.
When updating output details, if the scale setting is invalid then set
it to 1.0 as a sensible value.
Note this doesn't actually enable scaling, just helps make sure we're
not injecting invalid scale parameters from the start.
Reviewers: zmike, devilhorns, cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2078
Summary:
The code to initialize outputs has duplicate stanzas for updating the
data members of the output structure. This set of refactoring steps
shuffles things around to eliminate the redundant code. I think this
also makes the code easier to follow too.
This also breaks out a new internal routine for looking up outputs by
id. I suspect this will have general usefulness later.
Reviewers: devilhorns, cedric, zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2077
Summary: Add doxygen comments for public API members
Reviewers: zmike, cedric, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2067
Summary:
Many of the functions in the compositor do some preliminary checks, to
ensure objects are valid and the right type. Most of the checks follow
a consistent pattern, for example:
if (!(ec = data)) return;
if (e_object_is_del(E_OBJECT(ec))) return;
if (ec->iconic) return;
This style makes it pretty straightforward to review the pre-conditions
of the function.
The one exception is the check to see if an object is a wayland pixmap;
this is implemented as a C macro.
E_COMP_WL_PIXMAP_CHECK;
The name of the macro is descriptive enough, but it conceals what is
actually being checked. I think that it is clearer and fits better with
the style of the rest of the pre-condition checks for this check to just
be shown as regular C code:
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
Reviewers: zmike, cedric, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2066
Summary:
All other E_NEW calls in this file check the return value, except this
one place. In this function, other calls are being checked for NULL and
handled so this one should as well. The other handlers in this function
follow the style of issuing an error message, freeing objects, and
returning false; we don't need to free anything so just do the error
message and return.
Reviewers: zmike, cedric, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2065
Summary:
These two functions are nearly identical so move much of the common code
into a helper function.
Reviewers: cedric, devilhorns, zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2053
Summary:
We should be building Enlightenement with "--enable-wayland-only"
even if xcb, ecore-x... are not present. The Evas wayland-shm
engine will then be a prerequisite, though.
E_Alert being too much X11-oriented, let us disable it completely
before it is ported.
Also, do not require the X11 rendering engines at runtime.
Reviewers: stefan, devilhorns
Reviewed By: devilhorns
Subscribers: stefan_schmidt, stefan
Projects: #enlightenment-git
Differential Revision: https://phab.enlightenment.org/D1986
Summary:
cosmetic: Cleanup whitespace for wayland compositor
There is excess trailing whitespace in several of the files for the
wayland implementation. These patches attempt to apply the spacing
rules for Enlightenment as documented at:
https://phab.enlightenment.org/w/coding_convention/
The whitespace rules are applied using the following emacs tabbing
settings:
(defun start-efl-c-mode ()
"C mode with adjusted defaults for use with Enlightenment
development."
(interactive)
(c-mode)
(c-set-style "gnu")
(setq tab-width 8)
(setq indent-tabs-mode nil)
(setq c-basic-offset 3)
(setq defun-block-intro 3)
(setq statement-block-intro 3)
(setq case-label 1)
(setq statement-case-intro 3)
)
This patchset also eliminates all tabs in favor of whitespace, as per
the coding style rules.
Reviewers: zmike, cedric, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2048
Summary:
We should keep a list of resources per output to propagate wl_output
changes to each client that bound an output.
The output list now contains all outputs, not just bound ones.
Reviewers: devilhorns, zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2047
Summary:
wayland: Check wl_array_add return for OOM condition
cosmetic: Make error return check syntax consistent with rest of code
wayland: Reuse use_adj to track child-forced adjust
wayland: Refactor to collapse if chain
wayland: Refactor _e_comp_wl_client_priority_adjust to collapse if chain
+ This uses early returns to unwrap a couple if clauses to make the code a bit less nesty.
wayland: Refactor if statements for consistency with rest of file
Reviewers: cedric, zmike, devilhorns
Subscribers: devilhorns, cedric
Differential Revision: https://phab.enlightenment.org/D2034
This fixes the crash and creates outputs based on e_randr
configuration (when in wayland-client mode).
Signed-off-by: Chris Michael <cp.michael@samsung.com>
this speed sup dir listing in efm drastically. first the e fm back end
uses an io thread that just spools through everything fast and sends
it over the mainloop to then send by ipc to e.
and on the e side we no longer use the heavy file internal magic using
api calls that wander all over a file for magic numbers - this is
insanely slow and brings listing to a crawl.
this came in a patch that I take full responsibility for not adequately reviewing at the time.
the names are confusing and counterintuitive, and it does not properly include the client namespace.
Summary: Building without ptrace (on OSes which do not support it, like OpenBSD) did not work, because the fallback code had small typos.
Reviewers: devilhorns
Projects: #enlightenment-git
Differential Revision: https://phab.enlightenment.org/D1990
We don't have e_randr2 calls for wayland yet, so ifdef those out if we
are building for wayland only
Signed-off-by: Chris Michael <cp.michael@samsung.com>
this adds 2 actions that only suspend a laptop (or hibernate) if there
are no external screens enabled. if there is no lid screen eg like a
desktop, then it will still go on as usual.
Wayland cursor set events should be ignored if the client sending them
doesn't own the surface the pointer is currently in.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
this makes highest priority screen the lowest (0) zone. this also
handles missing screesn that you are relative "of". missing clones are
not working atm. also zone reconfigure moves windows now too