Key state updates need to be consistent. As we update the key state on
key up regardless of client focus, then we should be doing the same in
the key_down event handler so that key state remains consistent.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
e_comp_wl_input_keyboard_state_update already makes a call to
e_comp_wl_input_keyboard_modifeirs_update so there is no need to call
it twice on key up/down events.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: In some cases these end up uninitialized and we crash.
Reviewers: zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2788
in order to maximize the amount of reused code the following details the current
process for xwayland compositing:
* get map request from window
* force reparenting
* show window
* await WL_SURFACE_ID x11 message
* move x11 client data + pixmap onto corresponding wayland client
* business as usual with wayland compositing
this is pretty similar to the method of the reference code in weston,
except that there's no x11 compositor in weston
Summary:
First of all, currently cdata->ptr.x,y contains e_client related pos.
But, cdata is owned by e_comp, not per e_client. So cdata->ptr.x,y should contain
absolute pos.
And, when a pointer resource is created, enter event should be sent to client.
Change-Id: I21cb031e293fe281e35ba89f3a96116a28a48856
Signed-off-by: Boram Park <boram1288.park@samsung.com>
Test Plan:
1. run e as wayland server
2. move cursor to around 50,50
3. run elementary_test
4. click the mouse left button on slide toggle widget.
(Don't move a cursor out of elementary_test. If you do, you can't find bug)
Reviewers: gwanglim, raster, devilhorns, ManMower, zmike
Reviewed By: zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2330
Summary: We should just use e_comp->wl_comp_data everywhere we can.
Reviewers: devilhorns, zmike
Reviewed By: zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2507
Summary:
If we don't set server mode we can deadlock when trying to use functions
that way for server mode to become set.
This can currently cause a startup freeze in e_scale_init().
Reviewers: zmike, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2520
Summary:
Currently enlightenment-wayland support pointer and keyboard events.(in input)
So I added EVAS_CALLBACK_MULTI_* event handler and hanling functions for wl_touch interface.
This code send wl_touch events to client like a pointer event.
Test Plan:
In wayland + enlightenment environment, generate multi touch events.
The enlightenment will be send wl_touch events to client.
Reviewers: raster, devilhorns, zmike
Reviewed By: devilhorns, zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2482
Summary:
A parent surface can be destroyed. In this case, ec->comp_data->sub.data->parent has
a wrong address which has already destroyed. Then, it occurs segmentation fault.
To avoid segfault, ec->comp_data->sub.data->parent should be NULL when a parent surface
is destroyed.
Signed-off-by: Boram Park <boram1288.park@samsung.com>
Test Plan: Run attached test program(subsurface)
Reviewers: gwanglim, cedric, devilhorns, zmike
Reviewed By: devilhorns, zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2484
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:
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:
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:
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
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:
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
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:
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>
many clients still have not had a first commit prior to running new_client placement,
so this will force a second run of that algo to prevent placing as though a client's
size = 1x1
<zmike> super funny idea: for client cursors, what if we just implement them as an override client with no animations and then hide the canvas cursor while the client is visible?
this started as a joke and it worked mostly fine so I improved it and now it's shipping and whatdoidowithallthesebugs.jpg
Since we call this function before it's actually defined in the
source, we'll just add a small function prototype at the top
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This fixes an issue where internal elementary dialogs would end up
creating 2 pixmaps and 2 clients for each window. This happened due to
the pixmap id not matching the elm window id.
This patch also handles reparenting internal elm windows if needed.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This fixes an issue where calling wl_resource_set_user_data
with an invalid resource would cause an abort in the wayland
libraries, Thus making E crash.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: add function prototype for subsurface_parent_commit, fix a
few typos which broke compile
Signed-off-by: Chris Michael <cp.michael@samsung.com>
- Remove client_window_hash (not needed).
- Add hook for evas resize and update surface (configure_send) during resize.
- Remove old buffer_refenerce mechanism
- Refresh pixmap on surface commit
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Fix improper tiler_clear in surface_commit function.
Add fast-path in surface commit to skip processing regions & damage if
the client is not visible.
Signed-off-by: Chris Michael <cp.michael@samsung.com>