Commit Graph

95 Commits

Author SHA1 Message Date
Seunghun Lee e402e2363a fix crash and memory leak when press and release any key repeatedly.
Summary:
since the size of wl_array is determined based on one byte,
so in order to compare with uint32_t, the size of wl_array should be divided by uint32_t's size.
and when calculate the size of wl_array by difference between two address,
address should type cast char* as one byte.

Test Plan:
(1) run terminology
(2) input any key several time.

Reviewers: devilhorns, zmike, raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D1089
2014-08-26 10:10:37 -04:00
Chris Michael d6254f4634 flush clients Before we dispatch main loop events as clients may queue
events onto the loop.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:37 -04:00
Chris Michael 165cf8db81 enable checking of windows going outside of e_config->screen limits
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:37 -04:00
Chris Michael 832cfa8f3d add support for mouse wheel events and pass them to wayland
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:37 -04:00
Chris Michael 5b581d88c3 check for valid comp_data before trying to use it.
Don't set pointer to 'k' in keydown event (we don't need it).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:37 -04:00
Chris Michael 894d147844 update some fixme/notes
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:37 -04:00
Chris Michael 024caabef9 Fix state of popup windows to skip taskbar, pager, etc, etc.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:36 -04:00
Chris Michael c308904e9b fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:36 -04:00
Chris Michael 8d720e4b04 remove debug/warning message
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:36 -04:00
Chris Michael d278de2d76 e-comp-wl: Handle setting window parent for internal dialogs.
Move parent->modal setting from the shell module to the compositor.
Support setting of various window types (dialogs, menus, etc).
Handle setting of internal properties (min size, max size, etc).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:36 -04:00
Chris Michael f92644446a Implement focus_down_set function to grab mouse & wheel bindings.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:36 -04:00
Chris Michael aac748dcdc Implement focus_check function and call on delete_request.
Don't try to ping clients that we are forceably killing.
Implement e_grabinput calls during focus_set.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:36 -04:00
Chris Michael 92bbc30710 Implement client stacking.
Ungrab mouse & wheel bindings when we delete the client.

Signed-off-by: Chris Michael <cp.michael@samsung.com>

remove client stacking code (apparently handled in e_client already)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:36 -04:00
Chris Michael b7e263bf12 Implement setting of client priority during focus events.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:36 -04:00
Chris Michael 118f4eb05e fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:36 -04:00
MinJeong Kim 4a5387df60 Resize input/damage/opaque pending tilers when client is resized
Summary: When the client resized, it need to resize tilers for surface region also.

Reviewers: devilhorns, zmike, raster, gwanglim

CC: cedric

Differential Revision: https://phab.enlightenment.org/D1020
2014-08-26 10:10:36 -04:00
Gwanglim Lee faf44b7a8a add client property event into wayland eval fetch handler
Summary: add client property event for wayland client

Reviewers: devilhorns, zmike, raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D1015
2014-08-26 10:10:36 -04:00
Seunghun Lee 2cc4a1cf80 use calloc to allocate memory of E_Comp_Wl_Buffer which is set to zero, instead of malloc.
Summary: E_Comp_Wl_Buffer's busy value should be updated after initialization as zero.

Reviewers: devilhorns, zmike, raster

Reviewed By: devilhorns

CC: cedric

Differential Revision: https://phab.enlightenment.org/D1011
2014-08-26 10:10:36 -04:00
Seunghun Lee 9f81abb729 use eina_hash_int64_new to create hash table "clients_win_hash" in case wayland, instead of eina_hash_int32_new.
Summary:
since the data as a key of hash is 64bit integers, clients_win_hash should be created to int64.
if not, loss of data can occur when add or delete data from hash table.

Test Plan:
(1) run any application. (added ec to hash table)
(2) close the application. (try to delete ec from hash table, but couldn't)
(3) after that, if _e_comp_wl_cb_render_post is called, since refer to ec which was already freed, enlightenment had been crashed.

Reviewers: devilhorns, zmike, raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D1006
2014-08-26 10:10:36 -04:00
Chris Michael 57b3c40ad1 cleanup unused code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:36 -04:00
Chris Michael 6717b77001 Switch Wayland Compositor to use Eina_Tiler for damages, opaque, input, etc.
Add code to hold references to 'buffers'.
 - Release 'buffers' After they have been rendered by the compositor.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:36 -04:00
Chris Michael 1238686136 set client shape rectangle properly based on input area
- fix wl client crashses (patch from gwanglim)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:35 -04:00
Chris Michael df278c9a74 Several fixes for Wayland Compositor:
- post a wl_buffer release After rendering is completed.
  - change code to follow compositor structure name
  - when creating compositor (inside X), set input keymap
  - don't set "reparent" for all new clients

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:35 -04:00
Chris Michael 9f56b2aafc set delete_request for internal e_clients and add giant FIXME note for
internal windows

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:35 -04:00
Chris Michael 434219f758 rewrite wayland compositor:
- reduce memory usage
 - remove duplicated pixmaps
 - remove duplicated pointer images

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:35 -04:00
Chris Michael 217d5a95bc remove old wayland compositor and old shell files
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:34 -04:00
Chris Michael 64683742c4 e-comp-wl: Fix keyboard input sending wrong keys
NB: When running wayland clients under X11, we need to subtract 8 from
the keycode value to reflect X's broken keyboard rules

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-06-26 13:41:25 -04:00
Chris Michael 12d22d8fc8 comp-wl: Only blacklist the actual Nvidia driver
If EGL returns No Vendor, don't blacklist it. Only blacklist the Known
to be Broken NVIDIA driver

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-06-26 10:51:20 -04:00
Chris Michael f056e7af62 check for an already existing wayland compositor before trying to
create another one.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-06-26 10:19:34 -04:00
Gwanglim Lee 26d3075e3d wl pointer configure: fix typo
Summary: ews->geometry.y needs to be set.

Test Plan: N/A

Reviewers: raster, devilhorns, zmike

Reviewed By: devilhorns

CC: cedric

Differential Revision: https://phab.enlightenment.org/D688
2014-04-02 10:39:07 +01:00
Mike Blumenkrantz 83475dad7e set wayland display socket based on e_ipc_socket name 2014-03-20 14:06:41 -04:00
Cedric BAIL ffe4bf794e e: let's just completely blacklist NVidia driver for Wayland. 2014-03-20 20:46:54 +09:00
Chris Michael db40e4b67e bugfix: Fix crash on eglTerminate with buggy Nvidia blob driver
NB: Thanks for the report cedric ;)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-20 10:18:44 +00:00
Chris Michael 9e68b402a4 @bugfix: Initialize the module idler even If we are wayland-only
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-18 07:43:05 +00:00
Chris Michael 915f8f0613 @bugfix: Fix building for WAYLAND_ONLY by using the proper define
sed -i 's/WAYLAND_ONLY/HAVE_WAYLAND_ONLY/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-18 07:43:04 +00:00
Stefan Schmidt 58286beed4 e_comp_wl: Remove unused variable.
Later on we use state_w directly.
2014-03-05 13:41:35 +01:00
Mike Blumenkrantz 5737103d67 wl pointers done-ish
pointers in E now come in two flavors, one for each protocol that we currently support. each is created from the owner compositor backend:

X pointers still work as usual

Wayland pointers are actually surfaces that we dump image data into periodically to render them as evas images

some small amounts of hack is necessary to make this work, namely blocking X pointers when a Wayland one is in use if we're running a multi-protocol compositor
2014-01-14 20:28:58 -05:00
Mike Blumenkrantz 12d7405a0f huge wl fixup (wayland clients actually working again)
* try to clear up build system for separating out ecore-x

* add #ifdefs for lots of ecore-x stuff

* break out some internal e wl functions for reuse in api

* store wl surface buffers as an inlist

* add protocol-specific client compositor data

** move lots of X client attributes here

* add pixmap type checks to a number of X-specific things, such as grabinput, to block them for non-X clients

* rearrange startup order to work with wayland

* move X screensaver code to e_comp_x

* flag modules still requiring X with -DNEED_X
2014-01-14 20:28:57 -05:00
Mike Blumenkrantz 86656e4df9 compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.

* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.

** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes

** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects

** protocol-specific window management and compositor functionality is now kept exclusively in backend files

** e_pixmap api provides generic client finding and rendering api

** screen/xinerama screens are now provided directly by compositor on startup and re-set on change

** e_comp_render_update finally replaced with eina_tiler

** wayland compositor no longer creates X windows

** compositor e_layout removed entirely

* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra

* e_manager is just for screensaver and keybind stuff now, possibly remove later?

* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor

** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.

*** do NOT set interceptors on a client's comp_object. seriously.

* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor

* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get

* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas

* deskmirror is (more) broken for now

* illume is totally fucked

* Ecore_X_Window replaced with Ecore_Window in most cases

* edge binding XWindows replaced with regular canvas objects

* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result

comp files and descriptions:

e_comp.c - overall compositor functions, rendering/update loop, shape cutting

e_comp_x.c - X window management and compositor functionality

e_comp_wl.c - Wayland surface management and compositor functionality

e_comp_canvas.c - general compositor canvas functions and utilities

e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems

additional authors: ivan.briano@intel.com

feature: new compositor

removal: e_border, e_container, e_popup
2014-01-14 20:22:02 -05:00
Chris Michael 41b0eda0d7 When binding to data_device manager, if we cannot create the resource
then notify the client and get out.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-06 07:07:50 +00:00
Chris Michael 122a962cfa Check that creating a new data_device_interface resource does not
fail, and bail out gracefully if so.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-06 07:07:50 +00:00
Chris Michael 566b27d15e If we cannot create the data_offer resource, then cleanup and exit
nicely.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-06 07:07:50 +00:00
Chris Michael 39816c17bc Update pointer, keyboard, and touch structures for recent upstream wayland/weston changes.
- Remove singular focus resource references
 - Use list of focus resources

 NB: Fixes zmike wayland client crash issue ;)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-24 15:21:29 +01:00
Chris Michael fa91255049 Use new wl_resource_for_each to send updated seat capabilities
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-24 11:41:35 +01:00
Chris Michael 599d98e3f3 Fix zmike issue w/ surface losing focus when we move/resize.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-12 15:02:59 +01:00
Chris Michael 0fd9c57ddc Update E18 wayland client application support with recent wayland git
changes.

 - Remove function & calls to wl_*_release as they are redefined in
the client protocol again.
 - Fix up calls for getting resource_user_data.
 - Add WL_HIDE_DEPRECTAED define

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-11 10:12:30 +01:00
Chris Michael 131eb77926 Remove wl_keyboard_release and wl_touch_release functions.
NB: Once again, they are redefined in the protocol (for now), so don't
need them here.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-11 10:12:30 +01:00
Chris Michael 01717bde88 Remove wl_pointer_release function
NB: It's redefined in the client protocol again (for now).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-11 10:12:30 +01:00
Mike Blumenkrantz bdd0bc624d add wl surface -> e_border mapping 2013-09-11 09:02:53 +01:00
Chris Michael f37f806eff Reduce extra function call to client_get_display
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-28 09:43:25 +01:00