Commit Graph

480 Commits

Author SHA1 Message Date
Mike Blumenkrantz 0973acbd60 remove _e_comp_wl_focus_down_set()
this function does nothing for wayland clients and never should have
been used in this file
2016-01-21 09:26:55 -05:00
Mike Blumenkrantz 73bcac7e72 reenable fallthrough surface (un)mapping for subsurfaces during commit
subsurfaces have no shell interface and rely upon the map state of parent
surfaces to determine whether they are mapped
2016-01-21 09:26:55 -05:00
Mike Blumenkrantz 86fc2b4019 remove duplicate visibility setting blocks from wayland surface commit
this is already present (and identical) in state commit
2016-01-21 09:26:55 -05:00
Mike Blumenkrantz 04aebcbeda always apply damages and input regions during wayland commit
mapped status is not relevant according to spec
2016-01-21 09:26:55 -05:00
Mike Blumenkrantz cd2ed1fc78 do not set focus in wayland client show callback for cursor clients 2016-01-21 09:26:55 -05:00
Mike Blumenkrantz 813a78ca05 automatically mark wayland cursor surfaces as visible during set_cursor
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
2016-01-21 09:26:55 -05:00
Mike Blumenkrantz d4bbe0727e |= instead of = flag setting for want_focus during wayland surface commit
if want_focus has already been set, this check should not unset it
2016-01-19 13:52:07 -05:00
Mike Blumenkrantz 77485f322e improve focus setting during wayland client show callback
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
2016-01-19 13:51:05 -05:00
Mike Blumenkrantz 0a2442d3b7 only do passthrough surface map on xwayland surfaces during commit
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
2016-01-19 13:46:29 -05:00
Mike Blumenkrantz 092c834c5e Revert "Fix issue of compositor surface create passing wrong parameter to"
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.
2016-01-19 12:21:37 -05:00
Mike Blumenkrantz fbe959cccc remove need_reparent, reparented, first_damage flags from wl client comp_data
these flags, and related code, have no functional purpose in wayland
2016-01-19 12:10:49 -05:00
Chris Michael 67170f40a1 Fix issue of compositor surface create passing wrong parameter to
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>
2016-01-19 10:48:38 -05:00
Marcel Hollerbach 37ad839f51 e_comp_wl: only ignore ignored clients
a override client (in terms of override like x) should get focus, which
would not happen for the case of the function call.
2016-01-18 22:26:51 +01:00
Derek Foreman 3304ea7b6c Remove inappropriate usage of %m
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
2016-01-14 12:41:47 -05:00
JengHyun Kang bdb462e19f Set cached xkb context/keymap
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
2016-01-05 13:07:27 -05:00
Mike Blumenkrantz 3d3484739c call ecore_wl2_shutdown() in wl compositor delete callback
shutdown/restart crash--
2015-12-23 12:25:42 -05:00
Derek Foreman 2e2205dbcb wayland: Add support for wl_surface.damage_buffer
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
2015-12-18 16:43:38 -05:00
Stefan Schmidt 46fbcd3f9b e_comp_wl: follow wayland session recovery namning change from efl.
Align out extension naming with other unstable wayland protocols.
No functional change, just rename.
2015-12-18 14:49:41 +01:00
Mike Blumenkrantz 09efa26653 set wayland new client focus based on accepts_focus and !override
seems to resolve some cases where focus is not applied to new clients
2015-12-10 13:37:52 -05:00
Mike Blumenkrantz 1313f64aa9 make e_comp_wl_surface_attach static and take a surface state
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
2015-12-10 13:30:18 -05:00
Mike Blumenkrantz 83777909b2 do not drop subsurface buffer early after commit from cache
this should work the same way as a normal surface
2015-12-10 13:29:58 -05:00
Mike Blumenkrantz a010138dcc apply already-committed wayland subsurface positioning after parent surface move 2015-12-10 10:32:31 -05:00
Mike Blumenkrantz 1b240c5b63 enforce wayland subsurface stacking order when parent surface is restacked 2015-12-10 10:32:31 -05:00
Chris Michael f5741f1cb4 Fix using global ewd variable by making it part of e_comp_wl
ref T2919

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-09 13:16:48 -05:00
Chris Michael 36b6a402c6 Try to init (and error check the init) of ecore_wl2 library before we
create a compositor

ref T2919

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-09 13:16:48 -05:00
Mike Blumenkrantz f005ac9bff create wl client connection during compositor init, use in shot module
fixes shot module

ref T2919
2015-12-09 13:16:48 -05:00
Mike Blumenkrantz c22ddd6039 call ecore_wl2_init() during compositor init
ref T2919
2015-12-09 13:16:48 -05:00
Chris Michael 7870721cab port wayland compositor to use Ecore_Wl2
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-09 13:16:48 -05:00
Derek Foreman 81ff082e0d Stop using MIN macros when choosing versions for wayland resources
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
2015-11-26 20:12:47 -05:00
Mike Blumenkrantz e8f4f30f40 adjust for SSD geometry during wayland client resize
client moveinfo includes the frame geometry, so this must be taken
into account when resizing a client which has a frame

fix T2863
2015-11-24 17:29:53 -05:00
Mike Blumenkrantz d32392760a always set wayland E_Client->redirected during client creation
fix T2846
2015-11-19 15:58:52 -05:00
Mike Blumenkrantz 4250a14861 set e_comp->gl for wayland compositors based on gl display bind success 2015-11-07 12:23:04 -05:00
Mike Blumenkrantz fc01d6a24c check for wayland egl extensions before starting a gl compositor
when running in software mode, evasgl performs no checking to determine
whether gl is available, leading to a crash due to missing extensions
2015-11-04 12:23:05 -05:00
Nicolas Aguirre a8bf439f88 Revert "Adds eglfs to Enlightenment"
This reverts commit ff1e7b5083.
2015-11-03 08:01:58 +01:00
Nicolas Aguirre 31ce65a2c4 Revert "Don't load xwayland if it isn't compiled"
This reverts commit 496ae3746f.
2015-11-03 07:57:56 +01:00
Florent Revest 496ae3746f Don't load xwayland if it isn't compiled 2015-11-03 07:50:21 +01:00
Florent Revest ff1e7b5083 Adds eglfs to Enlightenment 2015-11-03 07:37:41 +01:00
Mike Blumenkrantz ae6416c27c add wayland egl client support
definitely not a feature, I promise™
2015-11-02 16:25:02 -05:00
Mike Blumenkrantz e8bcf1016f use correct param ordering for setting wayland client frame geometry
function uses l,r,t,b and not x,y,xx,yy

fix T2624
2015-10-13 13:31:47 -04:00
Mike Blumenkrantz 60a1dfaf4f remove duplicate surface size update for wayland clients during commit
this has already happened in e_comp_wl_surface_attach()
2015-10-13 13:25:15 -04:00
Mike Blumenkrantz be49b11bd3 do not set frame geometry on frame-possessing wayland clients 2015-10-05 15:56:04 -04:00
Seunghun Lee 1ce8b362de clear the tiler for input region after setting to comp object.
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
2015-10-05 12:47:29 -04:00
Boram Park b9b650806f should remove a frame resource from pending.frames list also
Summary: Signed-off-by: Boram Park <boram1288.park@samsung.com>

Reviewers: stefan_schmidt, gwanglim, raster, zmike, devilhorns

Reviewed By: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3079
2015-10-02 12:38:30 -04:00
Mike Blumenkrantz cdf6650a11 redo wayland client buffer referencing
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
2015-09-29 18:53:15 -04:00
Mike Blumenkrantz 89a789fe3d redo CSD for wayland clients to use comp object frame geometry
this fixes issues with client placement and is a more native solution
than the previous hacks
2015-09-29 18:53:03 -04:00
Mike Blumenkrantz ba92337882 never mark wl client pixmaps as dirty or refresh them
this has no meaning for a wl pixmap in the current implementation
2015-09-29 16:35:30 -04:00
Boram Park 6d2572efc0 Creating wl_shm global object before creating other global objects
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
2015-09-23 09:15:53 -04:00
Chris Michael 7c595f7ea1 enlightenment: Fix formatting of Wayland compositor code so it is easily readable in 80 columns
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-09-03 11:16:07 -04:00
Stefan Schmidt 714b84308d e_comp_wl: create global and bind session_recovery interface
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.
2015-08-26 16:09:25 +02:00
Mike Blumenkrantz 91ed3995f0 remove some local aliasing of e_comp_wl global 2015-08-13 16:08:55 -04:00