Commit Graph

284 Commits

Author SHA1 Message Date
Bryce Harrington 126d658914 wayland: Whitespace cleanup
Summary: Cosmetic

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2061
2015-02-26 16:42:27 -05:00
Chris Michael 35c3eb7dcf fix compile issue due to output change and fixup subsurface creation to match new "state" paradigm
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-26 15:33:40 -05:00
Chris Michael b6be9efe26 Implement buffer_reference to fix client resizing issue
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-26 15:33:40 -05:00
Derek Foreman dd2058d8a6 Don't crash when an error pop-up occurs before the compositor is set up.
Reviewers: devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2059
2015-02-26 14:43:10 -05:00
Bryce Harrington 5bebba3036 wayland: Refactor out common mouse handling code
Summary:
These two functions are nearly identical so move much of the common code
into a helper function.

Reviewers: cedric, devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2053
2015-02-25 22:00:11 -05:00
Bryce Harrington 89dbb9bd27 cosmetic: Whitespace cleanup of wayland client files
Summary:
cosmetic: Cleanup whitespace for wayland compositor

There is excess trailing whitespace in several of the files for the
wayland implementation.  These patches attempt to apply the spacing
rules for Enlightenment as documented at:
https://phab.enlightenment.org/w/coding_convention/

The whitespace rules are applied using the following emacs tabbing
settings:

 (defun start-efl-c-mode ()
  "C mode with adjusted defaults for use with Enlightenment
  development."
  (interactive)
  (c-mode)
  (c-set-style "gnu")
  (setq tab-width 8)
  (setq indent-tabs-mode nil)
  (setq c-basic-offset 3)
  (setq defun-block-intro 3)
  (setq statement-block-intro 3)
  (setq case-label 1)
  (setq statement-case-intro 3)
 )

This patchset also eliminates all tabs in favor of whitespace, as per
the coding style rules.

Reviewers: zmike, cedric, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2048
2015-02-24 17:34:20 -05:00
Chris Michael e8d0ac4f2d append E_Comp_Wl_Output to compositor's output list during output_init
call

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-24 15:27:48 -05:00
Chris Michael e36d2f5235 don't remove E_Comp_Wl_Output on unbind as this Could lead to nasty
crashes if a second client tries to bind wl_output

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-24 15:17:07 -05:00
Derek Foreman 1da3aa24dd Fix wl_output tracking in wayland compositor
Summary:
We should keep a list of resources per output to propagate wl_output
changes to each client that bound an output.

The output list now contains all outputs, not just bound ones.

Reviewers: devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2047
2015-02-24 15:10:37 -05:00
Bryce Harrington 40998b8a6e Code cleanup and check for OOM condition with wl_array_add
Summary:
wayland: Check wl_array_add return for OOM condition
cosmetic: Make error return check syntax consistent with rest of code
wayland: Reuse use_adj to track child-forced adjust
wayland: Refactor to collapse if chain
wayland: Refactor _e_comp_wl_client_priority_adjust to collapse if chain
 + This uses early returns to unwrap a couple if clauses to make the code a bit less nesty.
wayland: Refactor if statements for consistency with rest of file

Reviewers: cedric, zmike, devilhorns

Subscribers: devilhorns, cedric

Differential Revision: https://phab.enlightenment.org/D2034
2015-02-24 14:47:56 -05:00
Chris Michael a8eb773752 Fix T2131 (crash when creating wl_outputs)
This fixes the crash and creates outputs based on e_randr
configuration (when in wayland-client mode).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-24 13:25:22 -05:00
Chris Michael 8e6d512076 change output_bind function name
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-19 17:02:46 -05:00
Chris Michael 6458ac3f8e fix some formatting ugliness
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-19 17:02:04 -05:00
Chris Michael 2d4db291d2 fix compiler warning about pointer targets differ in signedness
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-19 17:00:24 -05:00
Derek Foreman 4276b3ac55 Provide wl_output interface to clients
Reviewers: devilhorns, zmike

Reviewed By: devilhorns, zmike

Subscribers: cedric

Maniphest Tasks: T2131

Differential Revision: https://phab.enlightenment.org/D2007
2015-02-19 14:49:01 -05:00
Mike Blumenkrantz 1d069ab3b6 add ctrl+alt+backspace to kill wl-only e
#barrel
2015-02-13 16:40:14 -05:00
Mike Blumenkrantz 23aad426aa remove some futile attempts at variable setting in wl client new hook
none of these attrs are available at this point so the client attrs can't be set
2015-02-13 15:17:48 -05:00
Mike Blumenkrantz a1af6fbdce remove unused var 2015-02-13 15:11:33 -05:00
Mike Blumenkrantz 67bbd1fe03 manage client pointer client hidden states when changing pointer cursor objects
fixes sticky cursors
2015-02-12 20:07:35 -05:00
Mike Blumenkrantz 9a6cddf91f don't clear wl surface input tiler during commit
this broke input regions for successive frames
2015-02-12 19:30:21 -05:00
Mike Blumenkrantz 5846e0febe unset wl client placed value on first commit to force placement
many clients still have not had a first commit prior to running new_client placement,
so this will force a second run of that algo to prevent placing as though a client's
size = 1x1
2015-02-11 17:58:27 -05:00
Mike Blumenkrantz aca462cb8c don't add wl evas callbacks multiple times
#sigh
2015-02-11 17:22:55 -05:00
Mike Blumenkrantz 6bf43fa081 don't use garbage values for new_client wl surface configures 2015-02-11 17:20:03 -05:00
Mike Blumenkrantz 9a82f7bcb0 reapply accurate ec->placed value for wl clients during surface commit configure
fixes client placement when client has not been placed prior to first commit
2015-02-11 17:14:28 -05:00
Mike Blumenkrantz e1e711ce53 use pixmap size for wl subsurface commit configure 2015-02-11 17:08:06 -05:00
Mike Blumenkrantz 491825c05f move map before configure for wl clients during commit
this ensures visibility is set correctly before attempting to set geometry
2015-02-11 17:02:01 -05:00
Mike Blumenkrantz 5ecc0ca0a1 use accurate xy coords for wl surface configures 2015-02-11 17:00:28 -05:00
Mike Blumenkrantz 77da958137 remove nonsensical wl client finding code
if the pixmap has no client set, no client exists for the pixmap
2015-02-11 16:23:07 -05:00
Mike Blumenkrantz 9006bb61e5 set wl client keyboard focus on evas focus and commit
ensure that focus is applied even if there is no new frame
2015-02-11 11:51:39 -05:00
Mike Blumenkrantz 4d80185e69 send wl keyboard enter during commit
in some cases this was happening before the kbd resource was available; this guarantees that it will be
2015-02-10 19:17:50 -05:00
Mike Blumenkrantz c4ba0f5242 setup evas callbacks for wl clients during commit
this was happening way too late and breaking some clients
2015-02-10 19:17:11 -05:00
Mike Blumenkrantz e3efba7ff7 set take_focus more appropriately for wl clients 2015-02-10 19:15:22 -05:00
Mike Blumenkrantz d97c6b04bb redo pixmap image border to take xywh instead of lrtb
client size is not set by the time opacity is set so it's necessary to store the full rect
2015-02-10 18:07:41 -05:00
Mike Blumenkrantz 090261bc1b don't add rect for entire screen on wl region create 2015-02-10 17:30:05 -05:00
Mike Blumenkrantz 7e422ed0c2 remove wl opaque tilers, just set border in opaque callback 2015-02-09 21:27:53 -05:00
Mike Blumenkrantz ce062750b6 set pixmap image borders for wayland clients 2015-02-09 21:16:40 -05:00
Mike Blumenkrantz 06defb7f94 fix wl input region setting 2015-02-09 21:14:18 -05:00
Mike Blumenkrantz d54d6640e8 don't set client shape rects based on wl opaque regions 2015-02-09 21:14:18 -05:00
Mike Blumenkrantz bce8470cef correctly set/update wl opaque regions 2015-02-09 20:44:01 -05:00
Mike Blumenkrantz 1bf6603baa force wl client cursor clients to hide when unset from pointer 2015-02-09 14:35:37 -05:00
Mike Blumenkrantz ee530798f0 replace all occurrences of cursor setting with calls to pointer util function 2015-02-09 12:24:48 -05:00
Mike Blumenkrantz 903b9beaed implement wl client cursor support...as clients
<zmike> super funny idea: for client cursors, what if we just implement them as an override client with no animations and then hide the canvas cursor while the client is visible?

this started as a joke and it worked mostly fine so I improved it and now it's shipping and whatdoidowithallthesebugs.jpg
2015-02-06 18:32:07 -05:00
Mike Blumenkrantz 8399ec5d6f configure/show/hide surfaces which lack shells automatically 2015-02-06 18:32:07 -05:00
Mike Blumenkrantz b720b7c179 use pixmap size for resizes in wl commit
the client size should be this anyway, but we just refreshed the pixmap above so this is guaranteed to be accurate
2015-02-06 18:32:07 -05:00
Mike Blumenkrantz 270bc92f81 add wl util function for calculating pixmap id 2015-02-06 18:32:07 -05:00
Mike Blumenkrantz a19957d3eb move wl pixmap stuff to use pixmap functions in compositor instead of in pixmap 2015-02-05 16:32:10 -05:00
Chris Michael 931409c687 only send key events to focused clients
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-04 11:59:19 -05:00
Chris Michael 0690b8debe change keyboard input listeners to Not depend on a client but rather
use ecore_event_handlers for key events.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-03 15:37:11 -05:00
Mike Blumenkrantz bc59464f99 make wl clients use post render canvas cb to clear buffers 2015-02-02 16:45:18 -05:00
Mike Blumenkrantz 66e4c59764 hide wl clients on surface delete
surface callbacks may not trigger xdg/shell unmap callbacks before this is called, so this ensures a hide animation
2015-02-02 13:39:32 -05:00