Commit Graph

184 Commits

Author SHA1 Message Date
Chris Michael 4343432ee7 elementary: Use software engine for wayland client pointers
There seem to be an issue with the ecore_evas_wayland_egl engine when
using them for cursors. The issue is that a black square shows up
behind the mouse pointer. This does not happen with the wayland_shm
engine so use wayland_shm engine for mouse pointers (for now) until
this can be sorted out.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-01 10:55:10 -04:00
Carsten Haitzler 30d7410699 elm win - add ifdef around wl code so it compiles with wl off 2016-10-29 10:16:29 +09:00
Chris Michael 3749ea47f9 elementary: Remove debug printing
NB: No functional changes, just removing left over prints

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-28 14:28:04 -04:00
Chris Michael e179115f41 elementary: Add internal function to set wayland cursor
Add an internal elm function we can call from withint els_cursor.c so
that we can set window cursor/pointer images based on what is supplied
by els_cursor.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-28 14:04:05 -04:00
Chris Michael 53f406a0a3 elementary: Fix build break for non-wayland builds
This fixes an issue where build would be broken if not building with
Wayland support.

Fixes T4778

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-28 12:35:12 -04:00
Chris Michael ecc3e2fa51 elementary: Don't set "move" cursor on wayland client apps
As most (if not all) compositors will draw their own "move" cursor
when moving windows around, there's no real need to set this one
client side.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-28 09:55:27 -04:00
Chris Michael e77efe72f7 elementary: Fix issue of extra pointer being displayed
As we only want to show our custom EFL cursors when the mouse is
actually inside the window, use the _elm_win_mouse_in/out functions to
control pointer visibility.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-28 09:55:27 -04:00
Chris Michael 257b4f0af8 elementary: Don't create pointer canvas for inlined_image
As we don't need a pointer or pointer canvas for
ELM_WIN_INLINED_IMAGE, add missing type check and skip creating
pointer canvas there.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-28 09:55:27 -04:00
Chris Michael 44746f24e9 elementary: Use separate checks for pointer object vs pointer canvas
As under the drm engine a softcursor will be created, but not a
pointer canvas, we need to use separate if checks in certain places
like showing, hiding the mouse pointer/canvas.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-28 09:55:27 -04:00
Chris Michael efe5150bb8 elementary: Delete mouse pointer when window is closed
If we are running Wayland clients which create their own mouse
pointers, then we need to remove the mouse pointer ecore_evas when the
window is deleted else we get crashes because the mouse pointer is
still trying to render. This fixes the issue of internal Enlightenment
windows causing crashes when closed.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-26 09:33:24 -04:00
Cedric Bail da22a046aa elementary: fix build without wayland. 2016-10-25 15:02:46 -07:00
Chris Michael c173be4db7 elementary: Implement support for EFL Wayland mouse pointers
This patch implements support for EFL Wayland applications to be able
to use EFL mouse pointers instead of ugly X cursors inside a Wayland
compositor. This does Not use Softcursor so the mouse pointer becomes
it's own surface which is then sent to wl_pointer.

NB: Some small hiccups when using wayland_shm such as dropped frames.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-25 14:22:07 -04:00
Chris Michael 0b290a260c Revert "elementary: Provide EFL mouse pointers for Wayland Client applications"
This reverts commit 0a46096337.

Reverting these changes as we need to handle mouse pointer differently.
2016-10-25 11:07:32 -04:00
Chris Michael 13f77a2456 Revert "elementary: Don't try to set pointer edj if there is no pointer"
This reverts commit 3686a8aa89.

Reverting this as we need to handle mouse pointers a different way.
2016-10-25 11:07:32 -04:00
Chris Michael ce827f3481 Revert "elementary: Don't always show pointer object"
This reverts commit f56dc8d0c3.

Reverting these as we need to handle mouse pointers a different way.
2016-10-25 11:07:32 -04:00
Chris Michael f56dc8d0c3 elementary: Don't always show pointer object
If we are using softcursor mode during intercept show, then we should
check that the pointer is actually in the canvas before showing it
else we end up with mouse pointers drawn on the canvas even when the
mouse itself is nowhere near a window.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-24 13:08:00 -04:00
Chris Michael 3686a8aa89 elementary: Don't try to set pointer edj if there is no pointer
If we don't have the sd->pointer.obj here, then there is no need to
try and set the edje theme for it.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-24 13:08:00 -04:00
Marcel Hollerbach 2866e2f980 elementary: check if its a wayland window before using ecore_wl2 api
otherwise there is a bunch of error messages from a app running on
x.
2016-10-22 20:22:18 +02:00
Chris Michael 0a46096337 elementary: Provide EFL mouse pointers for Wayland Client applications
This commit allows EFL wayland client applications to make use of EFL
mouse pointers instead of the wayland-cursor provided ones.

NB: There are still some minor hiccups with this (move pointer does
not change, mouse pointer getting clipped off when on the lower
border, etc) but those will get sorted out soon.

Feature request by the old man ;)

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-21 15:32:47 -04:00
Jean-Philippe Andre 8a9f0bd603 evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
 - intercept
 - smart resize (do stuff), super, super, super
 - evas object resize

The new code is more like:
 - intercept
 - super, super, super, evas object resize
 - do stuff

But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 11b7cf6b72 evas/elm: Remove function group_move
This is an override of efl_gfx_position_set.
As for the other patches, I hope I didn't break anything.

A problem likely to happen is that the super call was inserted
too early or too late in the call flow. For instance:

  _myclass_position_set(obj, x, y) {
    position_set(super(obj), x, y);
    position_get(obj, &prevx, &prevy);
    do_something_with_delta_xy();
  }

The above code flow is obvisouly wrong, but may have crept in this
patch (such a bug sneaked in inside smart object, breaking
everything at first).
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 97c9fa64a4 evas/elm: Remove group_show and group_hide
These should be just overrides of Efl.Gfx.visible.set. Many
widgets were handling smart show() and hide() manually, which
means this patch is quite large.

Hopefully this doesn't break anything, obviously. But here are
some widgets known to be problematic, as the old code flow was
really strange (sometimes not calling the efl_super function):
 - window
 - notify
2016-10-12 11:25:56 +09:00
Guilherme Iscaro cc999bcc09 Efl UI Win: Avoid unused variable.
It's only used under X11 and Wayland backends.
2016-10-10 14:20:48 -03:00
Tom Hacohen 9c779dca90 Rename efl_self to efl_added
It has been discussed on the ML (thread: "[RFC] rename efl_self") and
IRC, and has been decided we should rename it to this in order to avoid
confusion with the already established meaning of self which is very
similar to what we were using it for, but didn't have complete overlap.

Kudos to Marcel Hollerbach for initiating the discussion and
fighting for it until he convinced a significant mass. :)

This commit breaks API, and depending on compiler potentially ABI.

@feature
2016-09-05 16:59:56 +01:00
Jean-Philippe Andre b3993b684e win: Add EO API to query state of multi touch points
This combines evas canvas functions to list and query
touch points into a single iterator:
 - evas_touch_point_list_count
 - evas_touch_point_list_nth_xy_get
 - evas_touch_point_list_nth_id_get
 - evas_touch_point_list_nth_state_get

This also fixes a number of issues related to feeding fake
input events.

Note: I wanted to add delta x,y information as well but it's
in fact not really possible outside the event callback itself,
as the previous x,y position will not be updated unless there's
an event.

@feature
2016-09-01 14:57:11 +09:00
Jean-Philippe Andre e61b7139ff win: Move pointer "xy" and "inside" to input interface
Those two properties aren't related to a "drawing" canvas
but to the current state of input.

Note: both Efl.Input.Pointer (pointer input event data) and
Efl.Input.Interface (common interface for input handling objects)
expose a pointer position API. Not sure what to do about that.
2016-09-01 11:57:43 +09:00
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Jean-Philippe Andre 062145b605 win: Fix ERR message with object,focus,in
enventor exhibits this issue, where the focus target is
NULL in some cases. The ERR message was harmless, but it's
good to avoid it and be explicit that the object should be
non NULL when adding event callbacks.
2016-08-30 15:13:40 +09:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Jean-Philippe Andre 3b175fd7e9 elm: Fix some ERR messages following previous patch
This simply avoids calling functions on NULL objects, since
the previous patch would ERR out rather than silently ignore
the problem.

I just add explicit NULL checks before calling the functions,
so it's clear the object could be NULL (in the widget).
2016-08-26 17:15:05 +09:00
Jean-Philippe Andre d504284dd2 efl: Rename Efl.Event.XX to Efl.Input.XX
This removes:
 Efl.Event interface

And renames:
 Efl.Event.Input -> Efl.Input.Event
 Efl.Event -> Efl.Input.Event (merged)
 Efl.Event.Pointer -> Efl.Input.Pointer
 Efl.Event.Key -> Efl.Input.Key
 Efl.Event.Hold -> Efl.Input.Hold

This also moves some interfaces from efl/ to evas/ where they
belong better.

This allows renaming Eo_Event to Efl_Event.
2016-08-26 10:18:01 +09:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Carsten Haitzler d86f73f9e6 elm win - fix elm win center to actually center again
@fix
2016-08-13 23:08:01 +09:00
Jean-Philippe Andre f8684635e4 elm_win: Fix ABI break with missing EAPIs
EAPI elm_win_type_set
EAPI elm_win_name_set

Those two APIs should never have been part of the legacy API,
but they have been generated since at least 1.16. The commits
  1aceb3bc19
and
  41aa19447c
removed the legacy symbols generation. It seemed like a good
idea since the APIs shouldn't exist, but in fact this broke
ABI. I hate this. So sorry about it.

I'm adding them back in with no documentation and as
EINA_DEPRECATED.

This is an emergency commit before the 1.18.x release
announcement.

Fixes T4344
@fix
2016-08-12 08:11:54 +09:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Chris Michael 585b1db623 elementary: Add call to set opaque_region for case of borderless and
alpha

If we have a borderless alpha window, then make call to set opaque
region accordingly. This still avoids calling opaque_region_set twice,
yet maintains opaque region for the above mentioned case.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-08-11 07:50:41 -04:00
Jean-Philippe Andre 28c917836c efl: Cleanup some code (return values)
This removes some useless code in various places, where the
switch from eo_do() to standard function call was not properly
refactored.

This changes:

type ret = 0;
ret = my_eo_function();
return ret;

To:

return my_eo_function();
2016-08-05 10:32:30 +09:00
Jean-Philippe Andre 28aa0ba79f win: Fix evas framespace under X
Mouse inputs would not work if the window is rotated,
because the framespace was invalid.

Fixes T4132
2016-07-28 16:30:41 +09:00
Chris Michael 3754ad0477 elementary: Reduce variable usage
As we don't use the framespace x, y here then there is really no need
to have them.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-27 12:02:51 -04:00
Chris Michael 3b82375835 elementary: Fix issue of wrong minimum size for some E dialogs
When we are calculating minimum size hints for the window object, we
should be adding framespace to maximum size, not subtracting it...

Honestly this just looks like a brain-dead typo.

Fixes T44225

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-27 11:12:23 -04:00
Chris Michael bf414d8c54 elementary: Avoid possibly setting opaque region twice
Previously, if the window had no frame object, then this could would
have been setting opaque region twice (for the alpha case). We can
avoid this if we move the alpha check to below the frame check.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-27 08:08:00 -04:00
Mike Blumenkrantz 80f91290c0 elm_win: move window contents back to 0,0 when deleting frame object
fix T4092
2016-07-21 13:51:16 -04:00
Mike Blumenkrantz 9b11b227a3 elm_win: simplify borderless_set when reapplying the same state 2016-07-21 13:51:16 -04:00
Mike Blumenkrantz fad8e90f5e Revert "elementary: Make wl frame borders above content"
This reverts commit 46904e19a7.

this breaks stacking entirely and prevents a large number of widgets from
ever becoming visible
2016-07-20 12:02:42 -04:00
Mike Blumenkrantz adbdc335d9 elm_win: handle elm,action,menu signal for wl clients
trigger the xdg-shell method for this when the signal is received

fix T3460
2016-07-19 14:15:15 -04:00
Mike Blumenkrantz d335617941 elm_win: simplify opaque region updating during fullscreening
already handled during _elm_win_frame_del
2016-07-19 13:23:40 -04:00
Mike Blumenkrantz f368a720a9 elm_win: update opaque region when frame is deleted
fix T4092
2016-07-19 13:23:40 -04:00
Chris Michael 1c832a1b12 Revert "elementary: Fix issue of toggling border state causing visual jumps"
This reverts commit fb24955782.

While this patch did fix the issue of toggling window Borderless state
in EFl-Wl client applications, it is "Enlightenment's" stance that it
will not change to match this fix, so this has to be reverted else
internal E dialogs show up with no border (due to them using SSD).

This is going to re-open T4092 sadly :( and now leave that bug with no
possible fix.

ref T4092

Fixes T4126

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-19 08:17:00 -04:00
Jean-Philippe Andre d2fcfafb46 win: Set window alpha when changing theme
This sets the window alpha back to 0 when switching from a theme
with alpha to one without. Thanks @bu5hm4n for asking about this.
2016-07-18 18:11:37 +09:00
Jean-Philippe Andre f13b0a4d5f win: Set proper flag when EDC specifies win "alpha" 2016-07-18 10:51:51 +09:00
Marcel Hollerbach cfaf332468 elementary: only call ecore_wl2 if wayland is enabled
fix T4125
2016-07-16 13:19:05 +02:00
Chris Michael fb24955782 elementary: Fix issue of toggling border state causing visual jumps
This commit partially fixes a phab ticket where toggling window border
state (elm_test -to "Window States") would cause the frame to be
destroyed thus making the window contents appear to jump around

ref T4092

NB: I call this a 'partial' fix because while it does fix the issue of
efl client apps, there is still some breakage in Enlightenment that
needs investigating.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-15 15:35:23 -04:00
Chris Michael 46904e19a7 elementary: Make wl frame borders above content
This commit just readds the layer setting code which made the frame
border be above content. This does make sense in some contexts

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-13 15:13:17 -04:00
Chris Michael 0e4b9afeb0 elementary: Fix issue of minimum resizing in wayland
This patch fixes an issue where if you tried to resize a window to
it's minimum size, the contents of the window would draw outside the
window frame. Basically, when we are setting min/max size hints to the
window object we need to account for framespace.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-13 09:40:22 -04:00
Chris Michael e0ed943936 elementary: Properly swallow wayland clients
This patch fixes an issue where wayland windows would not swallow
clients properly. Basically, we should be swallowing the elm window
layout directly rather than use a rectangle (as was previous). This
commit also waits until the internal elm theme has been applied to the
sd->edje object before adding the wayland window frame.

This commit has the added benefit of being able to remove an additional
Evas_Object from the internal data structure.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-12 09:44:14 -04:00
Carsten Haitzler 2936834d31 elementary - fix focus switching again after break
this fixes T4053

this was due to everal widgets haveing changed their class names and
are using the new names for mapping to keybinding config that used
legacy names to match binding to widget.
2016-07-12 18:06:13 +09:00
Wonki Kim 19b2915863 elm: Fix potential null point dereferences.
Summary:
If every assigning logics to enginelist is not performed some how,
system will crash because the first parameter of strcmp is null.

Test Plan: N/A

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, Hermet, raster, jpeg

Differential Revision: https://phab.enlightenment.org/D4149
2016-07-08 21:28:18 +09:00
Jinyong Park 3271ec8d18 theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum

* related history : 4ca3ef4514
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.

@fix

Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4073
2016-07-01 15:09:43 +09:00
Jean-Philippe Andre 2065aedc44 win: Remove font & image cache functions
Those actually belong to elm_config, or rather Efl.Config:
  efl_config_int_set("cache_image_cache_size", 42);
  efl_config_int_set("cache_font_cache_size", 1337);
2016-06-30 14:34:59 +09:00
Jean-Philippe Andre 0f6268ff44 win: Attach config API with eo compositing 2016-06-24 17:10:21 +09:00
Jean-Philippe Andre 17c531658f win: Add property accel_preference
It supports the same syntax as the config value, but
overrides it. This provides a more convenient way to select
the acceleration for a single window.

Its get() value should be what was effective when the window was
created. So it can depend on the config or a previous call
to set().

@feature
2016-06-23 17:44:37 +09:00
Mike Blumenkrantz 2119a74a5d elm win: only set wl cursors on mouse in to the window area
in the case of csd regions, canvas mouse in != window mouse in

ref T3819
2016-06-22 11:17:36 -04:00
Mike Blumenkrantz 95b5533f73 elm win: set input regions for wl windows again
this seems to have been lost at some point and was breaking input

ref T3819
2016-06-22 11:16:58 -04:00
Jean-Philippe Andre 7bf8da2baa evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Jean-Philippe Andre 52f9220b3f Evas: Rename smart object into Efl.Canvas.Group 2016-06-17 19:32:43 +09:00
Jean-Philippe Andre 42b63f5507 Evas: Add smart_ prefix to all smart functions (eo)
This is a first step at separating legacy smart
object features away from standard efl interfaces.
2016-06-17 19:25:48 +09:00
Jean-Philippe Andre 9a052a740d Evas: Move smart_callbacks_descriptions to legacy 2016-06-17 19:25:47 +09:00
Ji-Youn Park 1f127fe45a efl_ui_win: move some APIs get the object's list in special location to efl_ui_win.
The apis to get the object or object list in special location is useful.
like game app.
so move these APIs from evas canvas to efl_canvas.
2016-06-17 16:06:26 +08:30
Ji-Youn Park 76d2778177 efl_ui_win: add some evas feature(pointer, cache ) to efl.canvas and efl_ui_win
evas will be internal, so APIs need to open public are moved efl.canvas eo
and efl_ui_win.
2016-06-17 10:30:22 +08:30
Carsten Haitzler f156737e8f elm - loop auto throttle - only do this once a window has been shown etc
only start throttling ocne we have a window and it has rendered or
been focused or mouse has gone in - then we are surely really visible
and sane and only start throttling if no windows are visible then. if
auto throttle is on this can improve startup time by the trottle amount
2016-06-14 18:15:00 +09:00
Jean-Philippe Andre 8a0e74afa8 evas: Move canvas events to a common interface
This merges window and evas events into a single name.
Some events are marked as @beta as they shouldn't really be
part of our EO API.
2016-06-14 16:27:42 +09:00
Jean-Philippe Andre 59f3841803 win: Optimize event forward using callback add/del events
This is a common pattern, listen to EO_EVENT_CALLBACK_ADD/DEL in
order to treat those events only when needed.
2016-06-13 20:33:29 +09:00
Jean-Philippe Andre dd24c588fa win: Add event device,changed 2016-06-13 20:33:29 +09:00
Jean-Philippe Andre 4bb8a6bd21 win: Add focus events (in, out, object in/out) 2016-06-13 20:33:29 +09:00
Jean-Philippe Andre be82f4f0fd win: Add event render,pre 2016-06-13 20:33:29 +09:00
Jean-Philippe Andre 3bee499503 win: Add new API win_name_get (EO and legacy)
I see no reason to have a set and no get.

@feature
2016-06-10 13:21:16 +09:00
Jean-Philippe Andre 37625fca91 Evas/Edje/Elm: Use combined_min instead of min everywhere
This allows apps to set the objects min size with hint_min,
while letting the rest of EFL define the minimum size with
rstricted_min.

I don't like the property names much...
2016-06-09 16:37:49 +09:00
Jean-Philippe Andre 62c5ebc784 Efl: Add screen_ prefix to all Efl.Screen apis
This will resolve conflicts between Gfx.size and Screen.size.
2016-06-08 17:25:06 +09:00
Jean-Philippe Andre 5542d6dc48 Efl: Add hint_ prefix to all size hints
This covers:
- base
- step
- aspect

The prefix hint_ is useful for bindings, and does not change
the generated C API.
2016-06-08 17:20:44 +09:00
Jean-Philippe Andre cfa739fbf6 win: Implement aspect control with Efl.Gfx.Size.Hint
This changes the API from a double to int, int.
Still not sure which API variant is the best (int,int or double).
2016-06-08 17:09:01 +09:00
Jean-Philippe Andre c5663ddb84 win: Forward render_post events from evas to window
To do: optimize event forward when no one is listening.
2016-06-08 13:59:08 +09:00
Ji-Youn Park 54f88b0368 efl_ui_win: Add back title_set as text.set
add jp's code again.
2016-06-08 08:56:39 +08:30
Ji-Youn Park 8cf9ee67bd efl_ui_win: rename elm_win to efl_ui_win 2016-06-07 23:11:48 +08:30