Commit Graph

184 Commits

Author SHA1 Message Date
Mike Blumenkrantz 2fe7878235 wayland: move pointer-related functions to ecore_wl2_input namespace
windows do not have pointers or cursors under wayland, seats do. due to
lack of multiseat support, most components simply use the "default" seat
with these functions, but this should make the corresponding code more
easily adaptable
2017-05-19 12:41:17 -04:00
Mike Blumenkrantz 5ebdf8f341 wayland: use shell activated state to indicate focus in csd
the current (v6) xdg-shell spec reads as follows:

	  Client window decorations should be painted as if the window is
	  active. Do not assume this means that the window actually has
	  keyboard or pointer focus.

so this is not equivalent to receiving/losing input focus and should not
be propagated as such

@fix
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz 01d3edef00 elm_win: don't unset wl cursor when starting move operation
I don't understand why this is here and it isn't required by spec?

ref ea7bbfe47d
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz 23cf5e80f7 elm_win: add elm_win_get()
it's frequently useful to be able to return the window object from
any object. this simplifies doing so for users

@feature
2017-05-19 12:41:16 -04:00
Jean-Philippe Andre 55b529cebc evas/elm: Make group_add/group_del internal functions
This hides those two legacy functions from the EO API.
2017-05-19 14:07:00 +09:00
Jean-Philippe Andre 781594088e evas: Make Efl.Canvas.Object.legacy_ctor internal
Continuing...
2017-05-19 14:07:00 +09:00
Jean-Philippe Andre 093938e5d9 win: Remove special class Efl.Ui.Win.Standard
All windows should be standard, really. Except when using legacy
elm_win_add() or if type_set() was called with a specific type.

I dislike type_set...

Ref T5322
2017-05-17 10:39:43 +09:00
Jean-Philippe Andre 01d4886328 evas: Add seat arg to modifier/lock EO APIs
This now matches the new seat-related set of APIs present as EAPI.
2017-05-16 20:47:49 +09:00
Jean-Philippe Andre 054aa012c4 evas: Use enum instead of string in Efl.Input.State
Ref T5312
2017-05-16 20:47:48 +09:00
Jean-Philippe Andre 2d6f53f2b9 evas: Replace Evas.Modifier_Mask with Efl.Input enums
This removes Evas.Modifier_Mask from EO.

This introduces two new types instead:
 - Efl.Input.Modifier
 - Efl.Input.Lock

Those are enums, not strings, containing all the known and
currently supported lock and modifier keys. The enums are
bit masks.

This effectively removes the ability for an application to
create and handle specific modifier or lock keys - with EO
API (legacy compatibility is unchanged, of course). I wonder
who ever required this?
2017-05-16 20:47:48 +09:00
Jean-Philippe Andre da229e34aa evas: Remove evas touch_point from EO
Note: it seems the EAPI evas_touch_point_list_xy_get() was
lst at some point, as it doesn't appear in the headers anymore.
It looks like we fail to catch an ABI break! abi_checker didn't
catch this!?

Ref T5312
2017-05-15 16:21:20 +09:00
Carsten Haitzler 3a60246297 efl ui win -> add test for centering + fix center of window before show
we haven't gotten replies yet on what our position or size should be,
so we should store them so centering works before show but after
resizing is evaluated (that also fixed by forcing an eval).

@fix
2017-05-12 19:21:48 +09:00
Mike Blumenkrantz ea0a3d304a elm_win: do not require mouse buttons to be pressed to activate csd move/resize
the api function requires this, but the unified handler for api+edje handler does
not, since edje singals are deferred and the button which triggered the move
may be released before the signal is processed

ref ea7bbfe47d
@fix
2017-04-21 16:16:12 -04:00
Marcel Hollerbach fb6c37f16f elementary: introduce helper functions for the redirects 2017-04-20 14:38:59 +02:00
Marcel Hollerbach ef8aed0385 efl_ui_win: migrate to the new focus system
this means, focus requests are redirected to the new focus manager.
2017-04-20 14:38:58 +02:00
Marcel Hollerbach 9aa7c63b2f efl_ui_win: make it a focus manager
Added a focusmanager with the window itself as the root.
2017-04-20 14:38:57 +02:00
Mike Blumenkrantz 442844441e elm_win: set wl window type during finalize
@fix
2017-04-07 16:06:41 -04:00
Cedric BAIL d2816c3879 elementary: fix test breakage.
It is perfectly valid to call this API with no pointer provided.
2017-04-07 11:38:10 -07:00
Shinwoo Kim 7a2aeec9ce elementary: win - override atspi component get interface
The efl_ui_win overrides _elm_interface_atspi_component_extents_get to give
correct value if screen_coord is EINA_FALSE which means relative position.
The efl_ui_win has given its object geometry value + ecore evas geometry value.
The object geometry value was equal to the ecore evas geometry value, so the
relative position was not correct(twice of ecore evas geometry value).
2017-04-07 13:43:00 +09:00
Carsten Haitzler c3372a5c7a fix evas canvas callbacks to use correct legacy callback function 2017-04-06 14:43:04 +09:00
Jean-Philippe Andre c234422357 win: Mark unstable APIs as @beta (stack API)
We have a tag for unstable API, use it. It'll be visible in the
doc and force users to add the macro before being able to compile
code.

This amends d8dd685966.
2017-03-29 09:51:28 +09:00
Chris Michael e725c0db95 elementary: Don't update opaque/input regions if not visible
Small patch to reduce calls to setting opaque/input regions in
wayland. Basically, if the window is not shown then there is no point
in updating these regions until such time that the window is actually
visible and the regions will get committed.

ref T5226

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-28 11:29:24 -05:00
Chris Michael fd77ff0d92 elementary: Minor formatting fix
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-27 11:33:57 -05:00
Chris Michael 59bf5476ee elementary: Don't set pointer object theme on start
As we are already resetting the pointer object theme when we make a
call to set the cursor, don't set it on window creation. This should
address the issue of animators getting created on window creation.

ref T5209

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-27 11:33:49 -05:00
Chris Michael 2537cd2cf7 elementary: Fix compilation for SDL
Not sure how long this has been broken, but the variable name changed
in this routine to "is_gl_accel"..."is_hw_accel" is no longer used, so
change variable name here to fix compilation with SDL.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-23 12:39:02 -05:00
Jean-Philippe Andre 063c3529a5 win: Avoid magic check failed in ecore with inline win
Fixes T4663
2017-02-16 21:45:12 +09:00
Jean-Philippe Andre c09b921e34 win: Avoid malloc in icon_object_set
Also support both Evas.Image and EO Efl.Canvas.Image classes.
Add a test case in elm_test (under "Icon").

I'm not so happy about this patch... it shows that the API
barrier between legacy and EO implemented for images may not
be such a great idea after all :(
2017-02-16 21:05:32 +09:00
Jean-Philippe Andre 8226fb2e87 win: Fix window icons with object set
Fixes T4981
2017-02-16 20:05:04 +09:00
Jean-Philippe Andre 358f2898c5 win: Make ELM_ACCEL work with msaa, depth & stencil
This makes the env var override and the elementary config
global override on accel preference work for not only "gl"
but also advanced configs such as "gl:msaa_high:depth:stencil"
2017-02-13 19:54:29 +09:00
Chris Michael e9b8dcf442 elementary: Fix return of elm_win_wl_window_get
This patch fixes an issue where the wrong wayland window would be
returned from elm_win_wl_window_get. When we lookup a window in
Enlightenment, this function would end up returning the parent window
(if existed) when what we want there is the actual window. This patch
puts the function more in line with the X11 equivalent.

Fixes T5142

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-07 10:50:09 -05:00
Chris Michael 4697d0c2b3 elementary: Ensure pointer hotspot update and reduce duplicated code
When we mouse_in on a window, the cursor hotspot may need updating for
the new pointer image, so utilize an existing function we already have
which will set the pointer image and calculate updated hotspot. This
patch also uses the same function call in _elm_win_frame_cb_move_stop
in order to reduce duplication.

ref T4987

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-30 12:59:29 -05:00
Chris Michael d485a116d3 elementary: Don't hide pointer window on mouse out
This patch fixes an issue where pointers would occasionally disappear
when running EFL apps in a Wayland compositor. This was occuring
because we would hide the pointer window on mouse_out (and thus attach a NULL
buffer to the pointer surface), but then when we mouse_in again on the
window, it still have a NULL buffer attached to that pointer surface.
This patch fixes the issue.

ref T4987

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-30 12:37:44 -05:00
Chris Michael 7c65f5ad20 elementary: No need to reset pointer surface on resize
As the pointer canvas will already be visible at this point, there is
no need to redo the wl_pointer_set_cursor call as we can just set the
pointer image we desire on the surface (_elm_theme_object_set) and
when the pointer canvas renders, it will have the proper cursor

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-30 12:24:27 -05:00
Chris Michael 4adc1ec8e7 elementary: No need to set null pointer surface on mouse out
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-30 12:23:14 -05:00
Chris Michael 005ad5eeef elementary: Create wayland pointer before frame
If we create the pointer After the frame, then we end up setting
elm_object_cursor on the frame object which we do not need so this
patch just slightly modifies the order of things during finalize so
that _elm_win_frame_add does not end up calling
_elm_object_part_cursor_set on the frame object.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-30 11:03:57 -05:00
Chris Michael bfd221e610 elementary: Don't set wayland window pointer if pointer ee not visible
This small patch avoids resetting ecore_wl2_window_pointer (and thus
wl_pointer_set_cursor) if the actual pointer canvas is not visible.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-30 10:58:55 -05:00
Carsten Haitzler 4fe9144c9d efl_ui_win - switch to the element being used for border type 2017-01-13 18:04:17 +09:00
Carsten Haitzler 11432d42a7 elm theme/test - add start of nviframe window style and test it 2017-01-12 20:21:04 +09:00
Carsten Haitzler 4d8b6d54bc elm_win - fix getting of stack id string if win id changes
new feature. win id changed with csd pus alpha so reget stack id
string then
2017-01-12 18:01:15 +09:00
Chris Michael 459a23244f elementary: Support xdg_shell version 6 show_window_menu function
As we now support xdg_shell version 6 on the client-side, we need to
use the zxdg_toplevel_v6 function call to show window menus.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-04 14:25:24 -05:00
Jee-Yong Um 6d0a2398ad Elm.Widget: rename "event.*" methods to solve name conflict
Summary:
Elm.Widget.event_callback_add conflicts with Efl.Object.event_callback_add.
To solve this problem, "widget_" prefix is added to methods starting with
"event".

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4521
2017-01-03 10:59:49 +09:00
Carsten Haitzler cc5dd2bd87 efl window stacks - implement pop to for x11 in the portable way 2016-12-22 15:17:43 +09:00
Jean-Philippe Andre 18123ae800 win: Fix shadow warnings 2016-12-20 16:07:50 +09:00
Carsten Haitzler 39af0d88aa efl stack wins - add base property/boolean to indicate win is a base
part of adding stacks...
2016-12-20 10:57:55 +09:00
Carsten Haitzler 4b96738443 efl_ui_win - use ecore_x window stack api to set up property in x11 2016-12-16 16:16:53 +09:00
Carsten Haitzler 75a429328a efl_ui_win - teamwork really has issues and i think needs deprecation
teamwork api in elm win (efl_ui_win) has a few issues:

1. it directly ddigs into ecore_wl2 and uses internal headers to use
zwp_* api's directly... which effectively tied elementary directly to
libwayland and thats not a good thing - thats why ecore_wl2 exists -
to act as a layer in between
2. the only thing that supports it is e and only wiht a module and
there is no fallback code in elm to work outside this environment, so
it's kind of broken by design and will not actually reliably work
3. from a stability and security point of view, and api and protocol
that allow a client to ask your wm/compositor to open ANY url - go
make a network request possibly to a hostile url/site is bad. needing
to handle so so so so many protocols, file types etc. etc. is going to
lead to issues that SHOULD at least be isolated in the app, but now it
spreads into your wm/compositor too. :(
4. there is ZERO benefit to asking the wm to do this. the app is
using efl already. it already has all the same abilities with the same
libraries to download/display etc. so why doesnt the app do it itself?
5. doesnt work in windows, osx, framebuffer (fbcon or drm)... only in
x11 and wayland. (and then only with e + module)
6. there is no way to detect if it's going to work and write your own
fallback (which shouldnt be needed/done anyway).

nice work and enthusiasm on making teamwork but it just isn't the right
thing - not in its current form and not by design (security reasons) :(

@deprecate
2016-12-16 16:16:53 +09:00
Carsten Haitzler 48ac4747b1 efl_ui_win - add window "view stack" api's and ability
this adds the a stack of windows (view stack, something like naviframe
but using multiple windows instead) to elementary allowing windows to
be put into a stack and treated as one "application" when ijn such a
stack with the newest window on top being the active/focused one (or
should be). this allows for special show/hide animations as well as
possibly special sizing policies and placement policies.

@feature
2016-12-16 16:16:53 +09:00
Mike Blumenkrantz 3b67f8be4c elm_win: update opaque region on resize when borderless
this fixes broken sizing on borderless windows
2016-12-08 11:36:47 -05:00
Jean-Philippe Andre bdb4977dda win: Implement stronger theme compatibility for frame_obj
The frame object requires a theme of version 119 or more. In fact
I think until we are totally happy with the window API (for EO) we
might want to bump that version regularly. That would indeed disallow
theme customization for border.edc until it's done.

This patch uses a pretty brute force way to set the theme file to
the default file from EFL installation. elm_config is not reliable
here.

This is very custom made and there may be a more generic way to force
a widget to use a minimum theme version. Yes that could mean ugly
widgets if we change the theme API but at least that would make them
work. Note that the border theme contains no visual elements, so the
colors of the background, etc... should all depend on the user
selected theme. But of course CSD (in Wayland) will have to use the
default theme -- and look grey.

Fixes D4976
2016-12-08 16:13:32 +09:00
Jean-Philippe Andre 4ff330856d win: Simplify sizing recalc
This amends the previous patch. Some moer testing showed that the
deferred resize flag was in fact harmful (on X with CSD).
2016-12-06 17:58:25 +09:00