Commit Graph

53 Commits

Author SHA1 Message Date
Mike Blumenkrantz 6bc7662459 add e_exec instances for wl clients if they set surface class: works for terminology
creating phony e_exec instances based on name/class allows wayland clients to show up normally in ibar
2014-01-14 20:28:58 -05: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 eb4c914c3e Initialize btn variable to zero
Fixes compiler warning 'btn' may be used uninitialized

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2014-01-04 11:24:55 +00:00
Chris Michael 58131a4274 Update shell for recent upstream wayland/weston changes.
- Update shell to support multiple resources on the client side

 NB: Fixes zmike wayland client crash issue ;)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-24 15:22:12 +01:00
Chris Michael 09768f143c Fix zmike issue w/ surface losing focus when we move/resize.
- Check if surface is still focused by the pointer on focus_out events
   NB: Needed due to spurious focus_out events we receive from evas/edje
 - On spurious mouse_out event, check if pointer is actually still
inside the surface.
 - Cleanup Move and Resize Grab code (don't need a binding event
struct here).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-12 15:02:59 +01:00
Mike Blumenkrantz bdd0bc624d add wl surface -> e_border mapping 2013-09-11 09:02:53 +01:00
Chris Michael 2aed20988c Get keysym from X on key_up.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-28 09:43:05 +01:00
Chris Michael ac27edb524 Remove redundant useage of grab pointer.
Add safety checks for pointer button_count.
When releasing a busy grab, also check if surface is NULL.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-28 08:16:02 +01:00
Chris Michael 5392c1884c Hook into mouse_wheel events for surface.
Send wheel event to the pointer interface.

NB: Discomfitor/Zmike .. You Have Mouse Wheel Support Now !! ;)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-23 11:22:23 +01:00
Chris Michael 32b1e742c7 Revert "Remove call to ecore_x function for getting keycode."
This reverts commit ccb72c38ca.

Revert this (for now) because it breaks key input for wayland apps running
inside of X. Need more time to look into it....
2013-08-21 14:41:46 +01:00
Mike Blumenkrantz c93467177a another ecore-x instance in wl_desktop_shell 2013-08-21 07:17:33 +01:00
Chris Michael ccb72c38ca Remove call to ecore_x function for getting keycode.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-20 09:56:19 +01:00
Carsten Haitzler 8b65fe069c pollers by default are in 1/8th of a second in ecore.... 32 made no sense. 2013-08-18 21:36:19 +09:00
Chris Michael 9d2b22553a Revert this button_count change for now (breaking move/resize here).
Revert "Remove button increments/decrements from interface callbacks as these"

This reverts commit 2dce6d935f.
2013-08-16 13:26:19 +01:00
Chris Michael 6a8524259a E configs ping interval for clients is in ticks. Wayland event source
timers are in mils ... let's do some multiplication here to stop
clients from pinging out all the time and getting killed.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-16 13:20:59 +01:00
Chris Michael 2dce6d935f Remove button increments/decrements from interface callbacks as these
are done in the mouse up/down callbacks.

NB: Thanks for the report Mike ;)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-16 13:03:16 +01:00
Chris Michael 1dca808f98 Get the pointer grab from the compositor's input
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-16 11:55:50 +01:00
Chris Michael bd9da64552 No need to allocate a grab here if we are just setting busy cursor.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-16 09:51:20 +01:00
Chris Michael 9325324c03 Increment/Decrement button count in the button handlers, not in the
border hooks.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-16 09:49:52 +01:00
Chris Michael 85d881d57b On ping timeout, get grab coordinates from compositor, not from surface.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-16 09:46:27 +01:00
Chris Michael 4ea6be012b Remove call to ecore_evas_free (border tries to free this already).
Fix wayland-client application moving and resizing to work again.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-15 14:22:12 +01:00
Chris Michael 21f267d007 Fix bug in shell which was causing wayland clients to always have
input stuck in upper case if Shift was pressed than released.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-14 14:02:23 +01:00
Mike Blumenkrantz 64dff19707 ignore wl shell client move/resize end hooks for now
wayland has no concept of non-pointer-based move/resize, so if these get triggered by, eg. a keyboard action, we're pretty fucked
2013-08-14 08:05:57 +01:00
Mike Blumenkrantz bba1dcfad7 don't wl shell grab on inactive shell surfaces when trying to set busy cursor; fixes infinite loop caused by ping timeout 2013-08-14 07:53:46 +01:00
Chris Michael 37e2134cf7 Fix crash when trying to move wayland client applications.
Add callbacks for e_desktop_shell interface functions (cannot be NULL
anymore).
When we bind the wl_shell, we will create the e_desktop_shell.

NB: The e_desktop_shell was not being created or bound to the display
globals.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-13 14:51:00 +01:00
Chris Michael 90ea063616 Fix Wayland Client Application Support to work again !! :)
- Add NULL handler for desktop_ready callback
 - Add separate binding callback function for the desktop shell
 - Create desktop shell resource with proper version.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-06 13:27:54 +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 ce0b069b51 Update wl_desktop_shell for 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 237e5f6f51 Do not need desktop_shell_cb_bind anymore.
Assign the shell to the shell_surface on creation (for future
dereference)
Make grab/move/resize work again for wayland-clients

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-03 08:57:12 +01:00
Chris Michael 7eb58780f3 Use wl_resource_get_user_data to get the currently focused surface.
Destroy surface ping_timer when surface is destroyed.
Use wl_resource_get_client for client comparison

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-02 13:57:07 +01:00
Chris Michael 91301b4d23 Don't try to bind desktop_shell inside of shell_bind (separate bind
for desktop_shell).
Use wl_resource_set_destructor.
When shell gets unbound, don't "free" the resource (handled internally
via wayland).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-02 09:32:36 +01:00
Chris Michael 31696533eb Fix pointer_focus of wayland-clients to not crash.
Use wl_resource_get_user_data where needed.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-02 09:13:08 +01:00
Chris Michael 9080e82ec4 Update wl_desktop_shell module for recent Wayland changes.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-26 09:23:13 +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 61ef289fe4 Check for valid wayland compositor before trying to init desktop shell.
Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-05-04 12:30:02 +01:00
Chris Michael 3300bcc31b Remove noisy printf.
Remove useless object_move call.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:56:12 +01:00
Chris Michael f3571b98f2 Reset surfaces to be borderless.
NB: Uncomment this line to help debug things.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:56:12 +01:00
Chris Michael 3ef01a7ee6 Remove printf
Remove nasty "fullscreen" hack.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:56:12 +01:00
Chris Michael 531407985e Add support for popup, fullscreen, move, resize of a wayland client.
Fix several bugs with regard to moving, resizing a wayland client.
Implement popup menu functionality.
Implement (but disable right now) fullscreen functionality
 - NB: Disabled currently as I am hunting a potential e_border bug.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:56:12 +01:00
Chris Michael a72b6d3034 Add support for transient surfaces.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:56:12 +01:00
Chris Michael 94d093fe32 Add code to support popups and fullscreen :)
Fix some unused variables.
Be sure to destroy any ping timers on surface destroy.
End any existing popup grabs when we start a new grab.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:56:12 +01:00
Chris Michael d22f3f53a5 Add support to resize wayland clients.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:56:12 +01:00
Chris Michael 98f813f176 Add support for moving surfaces.
Add support for fullscreen/unfullscreen.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:56:12 +01:00
Chris Michael 89782f0f4c Add code to unset the pointer cursor image when the mouse leaves the
input area.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:56:12 +01:00
Chris Michael 3ba4da16b2 Set the e_border to borderless by default for wayland clients.
Add function to listen for the ecore_evas resize and adjust the size
of the surface smart object.
Add support for Maximize/Unmaximize of wayland clients.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:56:12 +01:00
Chris Michael 757e477275 Add support for key up/down events from the surface and pass them
along to the wayland client.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:55:00 +01:00
Chris Michael 0fc304eae5 Handle mouse up and down events from the surface.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:54:59 +01:00
Chris Michael a4d26ee3a8 Add support for the e_surface smart object.
Add code to listen for the callbacks from e_surface and pass events
along to the wayland client.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-16 12:54:59 +01:00