Commit Graph

59 Commits

Author SHA1 Message Date
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
Chris Michael beda3a827a Handle mouse wheel events in the default pointer grab
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-23 11:21:13 +01:00
Chris Michael 6e226bfd8e Fix surface input region miscalculation after resize.
NB: Try this Mike.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-19 09:23:07 +01:00
Mike Blumenkrantz 71b387deea use inlist for wl surface list 2013-08-19 03:31:24 +01:00
Chris Michael e4924a5986 When surface gets destroyed, reset the pointer surface.
When calling pointer cursor set, if no current surface is focused then
unmap any existing pointer surface and set to NULL in the structure.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-16 11:56:17 +01:00
Chris Michael 9e371c10c8 Get surface from the surface_resource data using
wl_resource_get_user_data function.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-16 09:55:23 +01:00
Chris Michael 54d53d82f2 Define wayland compositor variable as externally visible (for people
using -fvisibility=hidden).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-15 07:23:43 +01:00
Chris Michael 3883a82fe9 Move module idler until After the display is connected.
Fix getting keyboard focused resource when a modifier is pressed.
Flush clients before we dispatch events (clients may add events to the
queue).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-13 14:51:00 +01:00
Chris Michael dfe66d1611 Add functions to surface interface for buffer_transform and
buffer_scale set.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-06 12:35:55 +01:00
Chris Michael 85eaf423b4 Use wl_resource_get_link when creating keyboard resource
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-26 12:05:31 +01:00
Chris Michael 2b6a8ecf24 Update wayland-client support for recent Wayland api changes (replace
wl_display_add_global with wl_global_create, and fix wl_client calls
to create resources with wl_resource).

NB: This brings client support up to par with version 1.2 of Wayland

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-15 13:42:46 +01:00
Chris Michael 8833073b41 Update e_comp_wl with recent wayland changes
- wl_client functions have been deprecated. replaced with wl_resource
 functions

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-09 10:28:30 +01:00
Chris Michael 96d778323d Remove _find_resource_for_client function and use
wl_resource_find_for_client.
More fixups for wl_resource functions (_get_client, set_destructor, etc)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-03 08:57:12 +01:00
Chris Michael 71924eb5d1 More conversions to wl_resource_get_user_data
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-03 08:57:12 +01:00
Chris Michael 74a7a4ef91 Check for valid pointer focus resource.
Use wl_resource_get_user_data to get the focused surface.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-02 13:57:07 +01:00
Chris Michael de80a48fc3 When we unbind the data device or input device, we do not need to call
free().
Free the allocated strings after creating the keymap (leak--).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-28 07:57:34 +01:00
Chris Michael 77e6d1c8e1 Update unbind of the data device to use wl_resource_get_link.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-28 06:50:26 +01:00
Chris Michael bd3281c248 Revert "leak--: Store xkb_rule_names into Input structure so we can free the strings"
This reverts commit 87c1798281.

NB: This actually causes a nasty crash on E shutdown, so I need to
come up with another solution.
2013-06-28 06:49:09 +01:00
Chris Michael 87c1798281 leak--: Store xkb_rule_names into Input structure so we can free the strings
on shutdown or keymap change.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-27 11:37:51 +01:00
Chris Michael ee05616f33 Update wayland client support in the E compositor to work with recent
Wayland changes.

NB: Although the code does compile and clients do run, I RECOMMEND
that you do not use this feature right now. There is a current bug in
Wayland that is causing crashes when you close clients.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-26 09:23:13 +01:00
Chris Michael 8f02899b9a Don't try to send an updated keymap if we have no keyboard resource.
Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-06-09 09:40:50 +01:00
Chris Michael 04b331ecb3 Move setting of XDG_RUNTIME_DIR to e_main
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-28 07:05:00 +01:00
Chris Michael d498c41467 As we need XDG_RUNTIME_DIR to be set before we can run wayland-clients
inside E, check if it is set, and if not set it.

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-05-24 21:53:39 +01:00
Chris Michael 9d2f29f0ae Add functions to allow wayland clients to run inside Enlightenment
again.

Wayland moved the input handling to be inside the "compositor" now, so
we need to add functions/support for that.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-13 09:03:43 +01:00
Chris Michael ca1b15918d Test for valid Wayland compositor before trying to shutdown.
Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-05-04 14:35:01 +01:00
Chris Michael f80097f0cb Check for valid wayland compositor and display before dispatching.
Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-05-04 12:26:25 +01:00
Chris Michael b82cb14698 e_xkb_layout_get can return NULL so trap for that and only set the
names.layout below if needed.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-03 06:39:00 +01:00
Chris Michael 6f0a4a63bc Start on code to allow Wayland Clients to render using EGL
Currently, all Wayland Clients render inside E using software
(regardless of E's compositor setting).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-26 13:48:46 +01:00
Chris Michael a07d830ce2 Add support for Dynamic Keymap changes in Wayland Clients.
Now, if you change E's keyboard layout, then Wayland Clients will also
dynamically change to the new keymap.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-26 13:48:46 +01:00
Chris Michael 243c9409c9 Add some additional error trapping for keyboard info initialization.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-17 13:29:26 +01:00
Chris Michael 20c6fb53e1 Call surface configure with proper geometry.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:56:12 +01:00
Chris Michael 98bc3ae1b5 Add code to update the pointer cursor image for wayland clients.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:56:12 +01:00
Chris Michael 3b2072d43d Remove dead comment.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:55:00 +01:00
Chris Michael b1a7691b9f Add missing EINTERN for init and shutdown functions.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:55:00 +01:00
Chris Michael ebb35638f5 Actually export comp_wl_time_get and comp_wl_input_modifiers update
functions as they may be needed in various shell modules.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:54:59 +01:00
Chris Michael 1fac56a7e4 Add code to load/unload the desktop shell module.
Add code to handle surface attach requests.
Add code to handle surface commit requests:
  - Use the surface smart object to handle input and image updates.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:47:55 +01:00
Chris Michael 3560f40237 Fix module_idler variable name (damn I cannot type today) :(
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:47:55 +01:00