We need to make sure we drop reference on all exit paths through the
hide callback - somehow this only seemed to break internal windows.
ref 65166c5a36
This code is similar to code in weston, but doesn't really work properly
for us in E, since this can blow up buffers behind the async renderer's
back.
The rest of the reference code has been pushed into e_pixmap, so we can
kill this all now.
We need to keep wayland buffers around even if they'll never be written
to again. This is part of Buffer_Reference's task in weston, but we
already have our pixmap abstraction which can serve mostly the same
purpose.
Remove the "buffer reference" stuff from e_pixmap and replace it with a
kept buffer for the last commit.
Add shared memory pool references to keep pools from going away on us.
We need to make sure wayland clients aren't deleted while the scene
graph has their data pointers, so we take an extra reference when creating
them.
We drop that reference by clearing the client's image data and putting it
in the render post_updates list.
using pointers for this turned out to have some corner case collisions, so
now just use something totally unrelated to the surface to ensure uniqueness
The resource destroy callback for frame callbacks will walk the frame list
to remove itself. When freeing that list we need to make sure the
resource destroy callback doesn't see the same list we're walking and
corrupt it.
There are 3 places a frame callback could be hiding. frames list,
pending.frames list, or subsurface cached.frames list. We weren't
clearing it from the subsurface cache on destruction.
Summary:
It's apparently possible to trigger at least some of these by interacting
with a client as it's closing, so add a bunch of checks.
Reviewers: zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3699
in the case where the xwayland pixmap has previously been marked as usable,
the corresponding client is guaranteed to have gone through the new_client
eval. allowing a second eval will result in wrong geometries being set for
the window in some cases
a cursor client should be shown/hidden as needed despite its lack of a
shell interface, and having a special flag to identify these types of
surfaces makes it easier to do that
take_focus will only be handled if the new_client flag is set. in all
other casees, focus_set should be called directly
new_client flag implies changed flag
these was a workaround for handling early internal windows which is
no longer necessary now that they will handle their map states more
effectively
now, any wayland surface (not xwayland) requires a shell to map the
surface as intended
This reverts commit 67170f40a1.
this was changed intentionally to use the resource pointer in order to fix an
issue where external clients would reuse the same surface id,
thereby breaking the compositor with duplicate entries in the pixmap hash.
note, however, that internal windows in wayland DO use an int type pixmap id.
this is easily detected by checking the pid of the client for a window before doing
checks. this is necessary in order to be able to flag internal clients as internal
while still being able to match them with their surface id
also, uintptr_t is NOT indicative of an int type being used, it's an
int type which has the same size as a pointer, allowing casts between ints
and pointer.
e_pixmap_new function
e_pixmap_new (when creating wayland windows) is expecting to get a
uintptr_t type passed into it (surface id). Previously we were passing
the entire wl_resource.
ref T3058
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Summary:
printf %m stringifies and prints errno. This is actually hugely confusing
if used in error messages after failures that don't set errno.
You may get "Success", or you may get an errno that was harmless ages
ago.
Some of the functions followed by %m have only some error paths that
set errno, or make multiple system calls that can set errno
independently - knowing the errno at failure time is unlikely to be
useful in these cases.
Reviewers: devilhorns, zmike
Reviewed By: zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3571
Summary:
Set xkb context and keymap to Ecore_Drm.
In enlightenment (used in wayland with drm backend), keymap is used only one.
So for avoid unnecessary open keymap files, set cached context and keymap.
But for this, enlightenment must compile keymap before init ecore_drm.
So I changed booting sequence also.
Test Plan: Distinguish time between before and after during add a keyboard device.
Reviewers: raster, devilhorns, zmike
Subscribers: cedric, input.hacker, ohduna
Differential Revision: https://phab.enlightenment.org/D3504
Summary:
damage_buffer posts damage in buffer co-ordinates instead of surface
co-ordinates. For us currently these are always the same co-ordinate
spaces. This will change when we start supporting viewports and
transforms.
Note: this is currently conditional on the macro
WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION which isn't in any
released wayland, but will be in the next. We can remove
the ifdefs and change our wayland version dependency when
it's released
#NefariousHiddenAgenda
Reviewers: zmike, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3468
when attaching a buffer, it's necessary to have the state available
in order to pull the buffer data into the state for use during commit
fixes subsurface frame callbacks
Summary:
libwayland-server.so will post an error if the requested version
is higher than the supported one anyway, so there's no point in
doing this.
Using MIN() to pick versions is a client side idiom.
#kansas
Reviewers: zmike, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3385
Summary:
there is no need to set repeatedly input region even if it's already applied.
and this patch remove the code to clear tiler from client's unmapped case.
this fixes that tiler for input region is removed before applying it to comp object in case client is unmmaped yet.
Reviewers: devilhorns, zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3076
the previous methodology was effectively:
attach -> ref(new buffer) x2 / unref(old buffer) x2
...
...
attach -> ref(new buffer) x2 / unref(old buffer) x2
this resulted in buffer management failures and crashing. now the
buffer gets 1x ref before render and 1x unref after render, ensuring
that the lifetime is accurate (assuming evas doesn't lie to us)
now we still have random crashing during resize, but not as much as
before
Summary:
It's more useful for client to bind wl_shm before receiving other global
object's events. Then, App can quickly prepare some buffers. i.e. cursor,
etc.
Signed-off-by: Boram Park <boram1288.park@samsung.com>
Reviewers: stefan_schmidt, gwanglim, raster, zmike, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3080
Before we can use the session_recovery protocol extension we need to register
its global and bind the interface to our implementation.
The callback for the provide_uuid call from the client is just a stub for now.
fixes a race condition where a configure request occurring before the xwl
client swap could fail to take effect due to xwayland bug where buffer size
is reported incorrectly
Summary:
Doing it just for bufferless surfaces wasn't quite enough, sometimes
we get a sequence like: attach, commit, frame, commit
And we need to respond to the frame.
#Kansas
Reviewers: zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2934
when not resizing, the sizes passed to configure should be based on the
window size and not the surface size. in order to calculate this, it's
necessary to keep track of the last-known window geometry for non-maximized
states and create offsets with which to calculate new sizes
this fixes directional maximizes as well as unmaximizing
this prevents keys from immediately being sent to newly-focused clients
and avoids the case of reverting focus from one app to another on keybind
close, only to have the second app also close immediately using the same keybind
it is now possible to create a xephyr window in a drm-enlightenment session,
launch wl-x11 enlightenment in xephyr, and then launch wl-wl enlightenment
inside that enlightenment
the primary limitation on this output module is that all internal windows will
appear in the outer compositor due to the current restriction of ecore-wayland
with regard to only having a single global display server connection
#Inception
blocks execution of resizes until the surface commit arrives. reduces
the race condition between resize and render and eliminates frame drops
during slow resizes
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