Commit Graph

457 Commits

Author SHA1 Message Date
Cedric Bail babcb0f1e4 elementary: do not send a PAUSE event if not iconified. 2017-11-15 16:29:14 -08:00
Marcel Hollerbach 07cb2d2dcd efl_ui_focus_object: document the bahaviour of the manager property 2017-11-15 13:21:22 +01:00
Shilpa Singh 36afcf2af9 efl_ui_win.c: send bounds changed signal on window rotation
Summary:
On window rotation send bounds changed signal to inform ATSPI client
about the orientation of window

Test Plan:
In ATSPI mode, when orientation of efl window is changed, ATSPI client should
get notification

Reviewers: kimcinoo

Subscribers: cedric, govi, rajeshps, jpeg

Differential Revision: https://phab.enlightenment.org/D5469
2017-11-15 14:41:37 +09:00
Jean-Philippe Andre 0c142462a1 win: Move autodel to C only
Note: this is C only, not legacy only.
The problem is that bindings will hold a strong reference to the window,
which will then die "under the rug" if autodel is enabled. This then
leads to at least ERR if not crashes.

Note:
elm_policy needs to support autodel and quit on last del only for C
applications. Bindings will require some other mechanism that doesn't
break all assumptions wrt. references.
2017-11-14 12:18:39 +09:00
Marcel Hollerbach 63ef60402f efl_ui_win: unfocus and focus again the most upper widget
if we unfocus a window we should unfocus also the current focused
widget.

fix T6297
2017-11-13 14:21:06 +01:00
Jean-Philippe Andre c308498a9d win: Fix alpha windows
Fixes T6334
2017-11-08 16:17:29 +09:00
Carsten Haitzler 784411800b elm win - note need for other display system code... 2017-11-07 17:36:57 +09:00
Jean-Philippe Andre d39bbc1491 elm: Create legacy widgets with elm_legacy_add
This will be used to solve issues around style_set:
if the widget is legacy or pure eo we may need to select a different
style. So in the constructor we need to know whether we are legacy or
eo. Note that calling style_set in finalize only is too late as we would
lose information such as efl_text_set() called inside efl_add().
2017-11-07 14:50:31 +09:00
Carsten Haitzler 6a47c2243e efl ui win - make win centering work with multiple screens
this should fix T6323
@fix
2017-11-07 13:53:27 +09:00
Jean-Philippe Andre 9cec14918c evas: Move evas_canvas.eo to legacy-only
This isn't meant to be installed. The canvas API in EO is based around
the interfaces Efl.Canvas and the widget Efl.Ui.Win. Anything else is
not EO (eg: ecore_evas, evas, ...)

Note: evas_canvas3d is the last remaining thing that is installed along
EO files, but those are all beta APIs.
2017-11-01 11:22:33 +09:00
Jean-Philippe Andre b8ca1272ae evas: Add seat argument to 'pointer_inside' (EO)
This merges pointer_inside and pointer_inside_by_device.
Affects only EO.
2017-11-01 11:22:33 +09:00
Mike Blumenkrantz ed30f41de8 wayland: add support for efl weight hint propagation from elm_win to efl_wl
@feature
2017-10-25 10:44:16 -04:00
Mike Blumenkrantz ffac7fc539 wayland: fix window stack implementation
ref T5350
2017-10-25 10:44:16 -04:00
Jean-Philippe Andre 006546a042 elm: Use auto_unref for parts
This avoids leaks.
2017-10-24 14:49:12 +09:00
Jean-Philippe Andre 2f465e1fbb widget: Rename EO APIs to efl_ui_widget_xxx
This only changes the eo_prefix for APIs.

Ref T5363
2017-10-24 14:30:21 +09:00
Lukasz Stanislawski 57aefc53c1 elm: rename Elm_Interface_Atspi_Accessible interface
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5341
2017-10-19 10:13:54 +09:00
Jean-Philippe Andre dfd98b3e48 win: Do not forward all key events on win (legacy)
OMG... I do not like this patch.

See T6148, two key down events are received when a key grab is installed
on a Win object. This is because all input events are propagated from
ecore all the way up to win and can be listened on. Unfortunately this
breaks existing applications that use the key grab API properly to
listen to key events.

Another side effect is that ALL key events are received by the window,
which means it's not limited to what the application expected (from its
list of grabs).

Solution (ugly): block propagation of key down/up events if the window
is a legacy window. This means that no key grab is required for EO
windows, but key grabs are still required for legacy windows.

Fixes T6148

@fix
2017-10-18 21:01:56 +09:00
Jean-Philippe Andre b5c241ca08 frame: Implement content set/get/unset
Not a huge fan of my macro as it uses efl_part() where a direct call
could be possible, depending on the widget (win can, frame can't).

See D5241
2017-10-17 17:31:38 +09:00
Jean-Philippe Andre c9c9e6a209 elm: Rename Elm.Activate to Efl.Ui.Activate
Note: This is an EO-only beta API.

Ref T5329
2017-10-17 17:31:38 +09:00
Marcel Hollerbach 75f5ea686f efl_ui_focus: add parent_provider
thats just a little helper, where the logic to find and fetch the
provider is bound to the position in the widget tree, this means that
for example gengrid could change the way the logical parent is
evalulated. (For example to map the logical parent to a item)
2017-10-13 12:31:47 +02:00
Jean-Philippe Andre ccee1c0944 eo: Simplify debug_name_override
Simply pass in the strbuf and don't expect the callee to own it. This
makes things simpler and safer (it'll crash only if the callee frees
said strbuf, and shouldn't leak). efl_ebug_name is new in the upcoming
release, EFL 1.21.

Realised this after talking with Amitesh. Thanks.

See 999dbd9764
And c4769ff898
2017-10-13 10:57:00 +09:00
Marcel Hollerbach 8453ebfe4e elm: move the focus direction definition to general
and remove the old definition
2017-10-10 19:28:48 +02:00
Marcel Hollerbach 17e730e8e0 efl_ui_win: port to new focus api! 2017-10-10 19:28:48 +02:00
Jean-Philippe Andre 4c0167916b focus: Avoid infinite loop in window
I kept the safety error message for easier debugging.
Test scenario:
  elementary_test -to "Window Inline"
  Click on an entry. Press Shift+Tab.

Ping @bu5hm4n
2017-10-10 19:32:50 +09:00
Carsten Haitzler 49df80aa6f efl ui win - quieten coverity complaint about dead code
the count ?: 1 check is pointless as count is already checked above.
make it clearer that it's > 0 and remove the ? check. silence for
coverity CID 1380542
2017-09-28 15:28:00 +09:00
Cedric BAIL 1ac4a03d4f elementary: avoid segfault when getting focus due to an infinite recursion.
This was two line switched and setting the callbacks on the wrong object.
2017-09-26 15:21:12 -07:00
Cedric BAIL 0b8e3e6fcf elementary: restore input propagation and destroy array properly. 2017-09-26 10:15:07 -07:00
Jean-Philippe Andre 56667a84b1 win: Remove invalid callbacks
Faulty commit (guess who?):
  596dba5fe5

See also d567faa778

Finally make check works again. That was... a painful lot of patches to
fix.
2017-09-26 18:15:45 +09:00
Jean-Philippe Andre e1df334caf Revert "Fix infinite recursion for legacy + efl ui win events"
This reverts commit d567faa778.

This is not trying to fix the root cause for the infinite loop.
2017-09-26 18:11:38 +09:00
Jean-Philippe Andre 5258a6d46f win: Avoid calling same function twice on shutdown
This avoids calling:
  ecore_evas_callback_delete_request_set
  ecore_evas_callback_resize_set
twice when deleting a window. Also adds safety over sd->ee.
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre c2ae93089b win: Avoid safety ERR in efreet
This is an error happening in make check. Annoying but mostly harmless.
2017-09-26 17:58:07 +09:00
Sungtaek Hong ebff5e8639 elm_bg: rename elm_bg to Efl.Ui.Bg
Summary:
elm_bg was supposed to be used only in legacy,
but since we need a common object to be used as a background of widgets,
it is now renamed as efl_ui_bg and supports EO APIs.

Reviewers: cedric, jpeg, woohyun

Differential Revision: https://phab.enlightenment.org/D5147
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre 8557fe818f input: Move pointer props to Canvas
efl_input_pointer_position is defined by two classes... bad!

Fixes T6066
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre e9dfcb44ff widget: Implement translation API in layout
This moves the API entry points from Widget to Layout parts. I don't
think the other widgets support translation, but that is easy to fix.
The actual code implementation remains in elm_widget.c.

Legacy-only widgets are covered by Part_Legacy, while all EO widgets
that have text inherit from Layout (except Win but I don't think the
window title was translatable in legacy).

This removes 2/3 remaining part APIs from Widget.

Ref T5363
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre 839c4ed395 elm: Introduce interface Efl.Ui.Translatable
This will be used to replace the part translation API in Elm.Widget. It
should work for both parts and non-parts (ie. the main text of a button,
for instance).

For now I'm taking the following approach:
 - All efl_text_set/get strings are untranslatable, i.e. get() returns
   the visible string, set replaces and can not be translated.
 - translatable_text_set/get needs to be used to enable automatic
   translation, which in turns calls efl_text_set to modify the visible
   string. Thus, translatable applications will have to use
   efl_ui_translatable_text_set a lot more than efl_text_set, unless
   they translate strings application-side.

Note that some other frameworks take a simpler approach equivalent to
calling efl_text_set() with an already translated text. This prevents
runtime language changes of the application, unless the application
handles them specifically.
2017-09-26 17:58:07 +09:00
Carsten Haitzler d567faa778 Fix infinite recursion for legacy + efl ui win events 2017-09-26 16:44:45 +09:00
Cedric BAIL 596dba5fe5 elementary: provide and implement lifecycle event on the window.
pause event means that the window is not visible anymore to any user.
resume is triggered when the window became visible again or just
became visible again.
2017-09-25 15:48:53 -07:00
Jean-Philippe Andre 0339ad7740 elm: Move base implementation for efl_part in widget
This means that ALL part handles inherit from the base part class
Efl.Ui.Widget.Part. Layout is the only exception where Efl.Part is
specially overridden.

This is a first step towards generic part APIs, including background in
all widgets.
2017-09-21 12:27:33 +09:00
Jean-Philippe Andre 3617053547 win: Use Eina.Size2D for pointer position
Also rename the function for more consistency.
2017-09-19 10:51:48 +09:00
Jean-Philippe Andre e4517b28d6 efl: Use Eina.Size2D for screen size
This API isn't so great when considering Wayland...
2017-09-19 10:51:48 +09:00
Jean-Philippe Andre 2df8ad36b4 evas: Use Eina.Slice on the stack (gfx.buffer) 2017-09-19 10:51:48 +09:00
Jean-Philippe Andre 1f242afdef evas: Use Eina.Size2D for gfx.buffer
For consistency.
2017-09-19 10:51:48 +09:00
Jean-Philippe Andre 686366a03b evas: Use Eina.Rect for object list functions
- objects_at_xy_get
- object_top_at_xy_get
- objects_in_rectangle_get
- object_top_in_rectangle_get
2017-09-19 10:51:48 +09:00
Jean-Philippe Andre bfd9487b94 efl: Use Eina.Size2D for Efl.Canvas.max_image_size
Rarely use
2017-09-19 10:51:48 +09:00
Jean-Philippe Andre d8eea084fb efl: Use Eina.Size2D for size hint aspect 2017-09-18 16:50:58 +09:00
Jean-Philippe Andre 6b5d155918 efl: Use Eina.Size2D for size hints base & step 2017-09-18 16:38:47 +09:00
Jean-Philippe Andre a72f3ec64e efl: Use Eina.Size2D for size hint combined min
For this patch I decided to add a pseudo legacy wrapper as the function
is called in a very large number of places. Fixing all those calls to
use the size2d form is a lot of work and a greater risk of b0rking
something.
2017-09-18 16:33:33 +09:00
Jean-Philippe Andre 7d2b4b6916 efl: Use Eina.Size2D for size hint restricted min
This is the "internal" or "intrinsic" minimum size, to be set by EFL and
not by applications.
2017-09-18 14:57:52 +09:00
Jean-Philippe Andre d24dcb3c24 efl: Use Eina.Size2D for size hint max 2017-09-18 14:20:03 +09:00
Jean-Philippe Andre 4c634ed78e efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I
got it right... fingers crossed.
2017-09-18 13:34:50 +09:00
Jean-Philippe Andre 8fb194d969 efl: Use Eina.Position2D for Efl.Gfx.position
Note: This is a little bit more cumbersome in some places but in most
it's more convenient than (x,y).
2017-09-18 13:22:54 +09:00
Jean-Philippe Andre f3eff6eb3e efl: Introduce Eina.Rect and switch EO APIs to it
It's a complex struct but defined in EO as a simple struct. ABI-wise
it's equivalent to Eina_Rectangle. Some macros that use Eina_Rectangle
also work on Eina_Rect out of the box, most of the code dealing with
x,y,w,h will require no modifications either.

But Eina_Rect provides direct access to a size or position 2d component,
as well as the usual x,y,w,h. The field "rect" is provided as a
convenience for code dealing with both Eina_Rectangle and Eina_Rect. We
may or may not require it.

Note: Size2D could use unsigned values but I have spotted a few places
in the code that actually use -1 to indicate invalid size (as opposed to
0x0).

@feature
2017-09-18 13:22:52 +09:00
Jean-Philippe Andre 58c2c50dcc efl_access: Use Eina.Rectangle (EO) 2017-09-13 18:20:45 +09:00
Jean-Philippe Andre 13da5e980e efl_gfx: Use Eina.Rectangle for geometry (EO)
This saves a few lines already (without even having the proper helpers
for stack rectangles).
2017-09-13 18:03:34 +09:00
Jean-Philippe Andre d5a31f3f30 edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.

As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.

Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.

Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.

This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)

Ref T5315
Ref T5306
2017-09-13 13:53:49 +09:00
Jean-Philippe Andre 6d0957b0a5 widget: Rename focus_manager_factory to create
factory is not a verb :)

Ref T5363
2017-09-13 13:43:55 +09:00
Lukasz Stanislawski 9cf8e75668 elm: rename Elm.Interface.Atspi.Component => Efl.Access.Component
Reviewers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D5164
2017-09-12 15:49:29 +09:00
Lukasz Stanislawski dfd17229fd elm: rename Elm.Interface.Atspi.Window => Efl.Access.Window
Reviewers: cedric, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5162
2017-09-12 15:48:10 +09:00
Marcel Hollerbach 6a12d9c367 efl_ui_win: specify the correct manager
a widget in higher hirachies is not registered in the lower one.
2017-09-02 20:06:15 +02:00
Derek Foreman e368896145 elm_win: Stop hiding the mouse cusor on window out under wayland
We needed to do this to prevent burning cpu with animated cursors
before we did frame callback based animating.

Now the compositor will stop our frame callbacks when our cursor
is implicitly visible when the pointer isn't over our window,
so we don't have to use window hides for it.
2017-09-01 13:32:50 -05:00
Jean-Philippe Andre cfe8170624 win: Fixup doc & code of icon_object
Ref T5322
2017-09-01 10:09:37 +09:00
Jean-Philippe Andre 74290355da win: Use array for available_profiles (EO)
The legacy API wraps the EO API.
All tested with "Configuration" test case in elm_test.

Ref T5322
2017-09-01 10:09:37 +09:00
Jean-Philippe Andre 4d6bb96e8d win: Drop calls to lower when using the EO API
Note: The distinction is made on how the window was created, not on
which API is used (evas_object_lower or efl_gfx_stack_lower or
elm_win_lower).

Ref T5322
2017-09-01 10:09:37 +09:00
Jean-Philippe Andre f88f0798ba win: Implement raise from stack (EO)
I think the intercept is not required anymore. All raise functions call
the ecore evas raise function.

Ref T5322
2017-09-01 10:09:37 +09:00
Jean-Philippe Andre b40d8296ff win: Move focus_highlight_animate to widget (EO)
Similar to the previous commits. Moved for consistency.

Ref T5363
Ref T5322
2017-09-01 10:09:37 +09:00
Jean-Philippe Andre 94632f8a44 win: Move focus_highlight_enabled to widget (EO)
This was actually declared in the internal legacy API in widget.
Forwards the calls to the window.

Ref T
2017-09-01 10:09:37 +09:00
Jean-Philippe Andre 0972c49438 win: Merge focus_highlight_style with widget (EO)
Note: elm_test "Focus Style" can be used to test this API. The test case
is a bit broken (overly complex EDC?) but if you're patient you can see
the difference between "glow" and "glow_effect".

Ref T5363
Ref T5322
2017-09-01 10:09:37 +09:00
Jean-Philippe Andre c0d7ea4af0 widget: Rename on_focus to on_focus_update (EO)
on_focus seems to imply that focus was just given to the widget, but
that function is called on any focus change (in and out).

Ref T5363
2017-09-01 10:09:37 +09:00
Jean-Philippe Andre 89492d859b win: Merge focus with elm_widget's (EO)
I believe this should work fine!

Ref T5363
Ref T5322
2017-09-01 10:09:37 +09:00
Jean-Philippe Andre 94d671c971 widget: Fix legacy for focus_mouse_up_handle (EO)
This removes the special code in the legacy API for
elm_widget_focus_mouse_up_handle. Add an internal helper to find the
first widget parent. And mark as protected.
Apparently this functions is still required for the new focus manager.

Ref T5363
2017-08-31 13:48:05 +09:00
Jean-Philippe Andre b6bab481aa widget: Mark old focus API as beta.
It's not beta. It's about to die.
Also, move #define ELM_WIDGET_BETA to the common header file, as it is
consequently required by ALL widgets. :(

Ping @bu5hm4n :)

Ref T5363
2017-08-31 11:22:04 +09:00
Marcel Hollerbach ea5b0bdfde efl_ui_focus_manager: make logical_end work better
it turns out that we should also repsect logical elements that are
having a redirect_manager, since they are more at the "end" then a
potential regular node.

The user now needs to handle the logical_end call on this manager, or
handle at all what he wants to do with this information.

efl_ui_win now handles it in the way that it just focuses that logical
node, (which results in the redirect manager beeing set, then calling
again logical_end on that manager. Repeating this until we have finally
found a regular node that does fit out needs.
2017-08-30 22:39:52 +02:00
Jean-Philippe Andre 8c1f771a67 widget: Use rectangle for focus_hilight
Ref T5363
2017-08-29 16:22:47 +09:00
Jean-Philippe Andre 6aa309ffb8 widget: Rename hook "disable" (EO)
Renamed to on_disabled_update.
Also passed in the new state of disabled. It's more convenient this way,
than having the subclasses call disabled_get.

Also simplify some code...

Ref T5363
2017-08-29 10:40:53 +09:00
Jean-Philippe Andre 6e5e8e567b widget: Rename hook "orientation" (EO)
Renamed to on_orientation_update

This internal / virtual function is in fact not overridden anywhere. Not
sure it is necessary to expose it in EO API?

Ref T5363
2017-08-29 10:40:53 +09:00
Mike Blumenkrantz 8dbea4a709 elm_win: check for wayland engine during finalize by checking for wl win
fake wins don't provide engine info, but a wl win will still exist

@fix
2017-08-25 14:48:12 -04:00
Mike Blumenkrantz d0f1a57ade elm_win: update opaque region for fake windows
fake windows still gotta render

@fix
2017-08-25 14:48:12 -04:00
Cedric BAIL d179a5c2a9 efl: remove PS3 backend.
This backend has received no patch and maintenance from anyone who could
actually test it over the last few years. After talking with KaKaRoTo it
is best to remove it. If anyone want to take over its maintenance, you
are welcome to revert this patch.
2017-08-25 10:48:42 -07:00
Jean-Philippe Andre f1ab8c8fee widget: Remove more functions from EO
Internaaaaaaaalsssss....

Ref T5363
2017-08-23 20:53:20 +09:00
Jean-Philippe Andre 5cfd698894 win: Remove types socket and fake from EO
Fake: This should never have had the fake_canvas_set API. It already can
not work after efl_finalize. And Ecore_Evas isn't part of EO API so it
doesn't make sense at this point to try to expose the fake window as
part of EO API.

Socket: This is the only type of window that implements socket_listen.
So we can just move this function to a new subclass.

NOTE: Socket & plug are currently broken, even in 1.20 (at least for me)!

Ref T5322
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre e9dffa723d win: Add Efl.Ui.Win_Inlined and remove parent2
Inlined windows are the only use case for parent2. We might as well want
to create a separate subclass for those special windows.

Ref T5322
Ref T5363
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre 20a5968c12 elm: Use a macro to handle key bindings
This factorizes the code and makes most widgets handle key down events
in the same way:
 - check that the object is not disabled, event is not on hold
 - figure out the key binding based on the class name
 - mark event as on hold

The class name is usually MY_CLASS_NAME but in some cases it was
MY_CLASS_NAME_LEGACY which may be different from the EO class name (eg.
elm_win vs. Efl.Ui.Win). In that case the key bindings are broken.

This breaks key bindings for the following widgets:
 - Win (focus)
 - Image ("clicked")
 - Video (move, play)

This fixes key bindings for the following widgets:
 - Nstate

Some widgets remain broken:
 - Photocam / Efl.Ui.Image.Zoomable

A patch will be applied to restore the key bindings for the above
breaks.
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre 069747b9de widget: Add eo event info inside widget_event
This is an internal function that should probably become an overridable
protected method, as it's required for proper event handling in widgets.
Next step: use eo_event_info in the widgets implementations. Then remove
legacy event struct.

Ref T5363
2017-08-23 11:16:45 +09:00
Mike Blumenkrantz f00a49835d wayland: remove xdg5 support
this has not been used or tested since last year and there are no major
compositors which lack xdg6 support
2017-08-11 18:43:12 -04:00
Mike Blumenkrantz 398ffe40a3 wayland: fix xdg-shell popup windows
@fix
2017-08-11 18:43:12 -04:00
Jean-Philippe Andre 39c791dcbc win: Prevent crash inside ecore evas callbacks
After any complex call on the window, a foreign evas/efl callback may be
triggered that could delete the window object. This leads to crashes in
queued jobs or even immediately after said callback (right now EO
prevents immediate memory free using eina_freeq or eina_trash so the
effects aren't immediate).

Funnily enough, this was a known issue according to some comments, but
no one bothered fixing it...

In this particular instance, a focus_out job was crashing while trying
to access now-invalid sd data.

I believe some uses of ELM_WIN_DATA_GET() may still be slightly unsafe
but most look like they should be the result of an EO call on the object
(eg. a call to efl_event_callback_call), which ensures the object is
alive.

Fixes T5869
2017-08-11 11:23:21 +09:00
Marcel Hollerbach df3d0e3d7b efl_ui_focus_manager: make focus a property 2017-08-10 20:56:04 +02:00
Marcel Hollerbach d4cd85aa55 efl_ui_focus_manager: split this of tinto a class and a interface
it turns out to be very handy to have a interface for the moving and
border elements, that is unconnected to the way of how widgets are
registering themself.

This for example enables us to get a simple focus manager that just
redirects the call into a internal 2 dimensional data struct
2017-08-10 20:55:50 +02:00
Jean-Philippe Andre dee61f4097 elm: Cleanup theme and style set functions
This makes efl_ui_layout_theme_set() return a Theme_Apply error
code. The type is now public as Efl.Ui.Theme.Apply.

Ref T5329
Ref T5363
2017-08-09 17:08:24 +09:00
Mike Blumenkrantz f7278719c1 elm_win: set shadow geometry based on borderless state
@fix
2017-08-07 13:26:51 -04:00
Mike Blumenkrantz 56936c91c0 elm_win: simplify/fix recalc logic when changing csd
forcing a full eval here is unnecessary and broken since such an eval could
either change geometry in unexpected ways or fail to accurately change
the underlying canvas geometry

@fix
2017-08-07 13:26:51 -04:00
Mike Blumenkrantz 6a6505106a elm_win: propagate window aspect hint in wayland 2017-08-04 16:15:43 -04:00
Taehyub Kim 94d3fd3d82 win: implement efl_provider_find for EFL_UI_WIN_CLASS
Summary:
Implement efl_provider_find function for efl_ui_win class.
This will support to search window class by efl_provider_find function.

Reviewers: jpeg, cedric, Jaehyun_Cho, thiepha, woohyun, Blackmole

Reviewed By: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D5045
2017-08-04 10:24:03 +09:00
Jean-Philippe Andre 999dbd9764 eo debug name: Use strbuf instead of slstr
This should be a little bit more efficient, even if more "risky"
in terms of leaks. The final API still looks exactly the same.
2017-08-04 10:24:03 +09:00
Jean-Philippe Andre 569ad0bac4 evas/edje/elm: Override debug_name in core classes
This is really only a demonstration of what kind of information
we can print with efl_debug_name_get(). Hopefully this can help
debugging with printf/ERR logs and even help with live debugging
inside gdb.

This shouldn't be used for other purposes than debugging, as the
exact string format is not defined.

@feature
2017-08-04 10:24:03 +09:00
Jiyoun Park c3d8a1d9f4 efl_ui_win: add error hanling code for malloc fail 2017-08-02 16:42:04 +09:00
Jiyoun Park ca625aa323 efl_ui_win: add EFL_UI_WIN_SOCKET_IMAGE type check
elm_win_socket_listen api only work for EFL_UI_WIN_SOCKET_IMAGE type window.
    So it is better to add type check code.
2017-07-31 15:20:02 +09:00
Mike Blumenkrantz 812be4a43b elm_win: do not implement aspect_get()
this breaks aspect hints.

@fix
2017-07-28 15:40:47 -04:00
Mike Blumenkrantz 5070ecc99a elm_win: instantiate csd frame after creating pointer surface
csd attempts to create sw cursors if the pointer surface doesn't exist,
so create the pointer surface before the csd to avoid duplicate cursors

 #TheDisappointer
2017-07-21 16:17:53 -04:00
Mike Blumenkrantz 5acd75c0c9 elm_win: do not set invalid geometries on the window object
clamping to 1x1 is not valid, neither is trying to always position at 0,0

 #IGot99TicketsBut1x1AintOne
2017-07-21 16:17:53 -04:00
Mike Blumenkrantz 10516fa3fd elm_win: hide pointer surface on mouse out
this should be unmapped so edje stops trying to render to it, though
at some point it could be optimized to not hide and just reuse the buffer
when showing again

 #IGot99TicketsBut1x1AintOne
2017-07-21 16:17:53 -04:00
Mike Blumenkrantz d67bdc92b7 elm_win: show pointer canvas after setting cursor
setting cursor calls resize, which is what sets the surface size

 #IGot99TicketsBut1x1AintOne
2017-07-21 16:17:53 -04:00
Jean-Philippe Andre dccdd20335 elm: Fix a safety error message
Happens when shutting down E
2017-07-20 14:46:49 +09:00
Jean-Philippe Andre 521f41f536 win: Fix main menu when not in framespace
On OSX the framespace and CSD (Client-Side Decorations) are not
supported at all... I am not able to test this case. This patch
restores the main menu functionality based on pre 1.19 themes,
where it was located inside win.edc (app content) and not in
border.edc (framespace).

Note that the initial size of a window may be wrong, eg as in
  elementary_test -to "Main Menu"

Fixes T5734 (hopefully!)
2017-07-18 18:42:16 +09:00
Jean-Philippe Andre 9dddc075d4 win: Amend previous commit about modifiers
The code was invalid, so making it valid now. Explicitely marking
the modifiers as unused, as mentionned in the documentation as
well.

See 9baa8752a9
2017-07-17 16:38:38 +09:00
Jean-Philippe Andre 9baa8752a9 win: Fix ABI compatibility for grab modifiers
This fixes an ABI change when moving from unsigned long long
modifier mask to a simple enum. This is a fix for the release
of EFL 1.20.
2017-07-17 14:24:30 +09:00
Amitesh Singh 98b9bb0da5 win: fix compiler warning 2017-07-13 11:16:48 +09:00
Marcel Hollerbach 23203c9e72 elementary: fix leaking manager objects
they are now automatically destroyed once the object is deleted.
2017-07-10 20:32:07 +02:00
Mike Blumenkrantz 4be19d87f4 elm_win: remove engine checks from window_id_get()
if these exist then just return the id
2017-07-07 15:22:23 -04:00
Mike Blumenkrantz 0ea3d0daaa elm_win: remove engine checks from wl_window_get
if there's a win, return it, otherwise this returns null anyway
2017-07-07 15:22:23 -04:00
Mike Blumenkrantz 81adac88dc elm_win: manually create a wl2 window for FAKE wins under wayland
this enables elm_cnp to function using protocol
2017-07-07 15:22:23 -04:00
Jean-Philippe Andre f8d8136b2c win: Avoid CRI message before finalized
Test case was Bg EO API in elm_test
2017-07-07 15:44:51 +09:00
Jean-Philippe Andre 68ad235f4e win: Try to fix some resizing issues with main menus
Omg this was a pain... The code is complete spaghetti and the
fact that the main menu is now in the framespace doesn't help
either. With this patch and the previous one (about ecore_evas_x)
Edi should be able to open correctly at the proper size and with
a visible menu.

This patch introduces a lot of changes so it'll need testing
before we accept it fully.

Fixes T5482
2017-07-05 18:46:38 +09:00
Jean-Philippe Andre 4488c51c5f win: Fix some sizing issues with main menu
This should fix issues when the main menu is wider than the
window content. This assumes that the menu is horizontal and
aligned with the client content.

The theme should probably handle this case better but right
now I am lost in the spaghetti resizes happening between
edje, elm, evas and X...

I am not very happy with this patch, and I think border.edc
needs some love in order to make it more robust and simpler
to read.

Ref T5482
2017-07-05 17:43:59 +09:00
Jean-Philippe Andre 59081043a8 elm: Always pass valid part name inside part APIs
This affects the legacy content_set/get/unset part APIs. This
should avoid some unwanted ERR messages in case an elm_object_
API is used on an elm widget that doesn't implement said API.

What this does is request the widget for the name of the default
part if NULL was passed in. Since some widgets are not elm_layout,
they have to override the API themselves, which is why I made it
an internal EO API (rather than a series of efl_isa()).

In theory, part should never be NULL when reaching the internal
implementation code in the widgets, at least for content.

In EO, efl_part(obj, NULL) should be invalid.

Ref T5629
2017-06-30 14:37:54 +09:00
Mike Blumenkrantz 34ce5d648f elm_win: access wl seats in a more portable way
seat names are not guaranteed to be the same in every compositor so
this should not be hardcoded
2017-06-23 17:43:44 -04:00
Jean-Philippe Andre 8ba83b102f win: Implement Efl.Canvas device & seat get
By name or id
2017-06-15 17:35:44 +09:00
Vincent Torri c233274529 elm+evas - windows - fix alt+f4 to work without losing alt key
fixes  T5581
2017-06-15 16:00:38 +09:00
Jean-Philippe Andre f54d891b2c win: Use efl_data_scope_safe_get instead of macros
This removes macros that don't make the code easier to read
and aren't actually as safe as this safe data_get.
2017-06-14 16:54:15 +09:00
Jean-Philippe Andre ed41adf791 widget: Implement mirrored from Efl.Ui.Base
Ref T5363
2017-06-14 11:02:05 +09:00
Jean-Philippe Andre 06b14827b7 widget: Implement scale from Efl.Ui.Base 2017-06-12 11:50:30 +09:00
Marcel Hollerbach af858d1d93 elm_widget: add factory method to the widget
with this function you can trap the creation of the mangers, and change
the behaviour as you need it. For example returning a custom manager.
2017-06-09 10:16:19 +02:00
Bryce Harrington 4f5ea8f3b7 elm_win: Fix breakage in frame bg style with Elementary WL2
Summary:
An else statement was added in 5ebdf8f3 with no clause, resulting in the
bg_solid property becoming conditionalized such that it won't be set
correctly when HAVE_ELEMENTARY_WL2 is defined and there is no wayland
window in use.

Further, this also causes focus to be left undefined.  Since there's no
window, presumably it should be turned off in this circumstance.

fix CID1375496, CID1375497

Reviewers: zmike

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4899
2017-05-23 16:46:00 -04:00
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
Jean-Philippe Andre 74187ff425 win: Fix sizing issues with new windows
This fixes sizing issues in EDI when opening a new window (not
the splash screen). This patch is quite brute force in the way
it pushes recalc.
2016-12-06 15:20:13 +09:00
Chris Michael 3214dad7c5 elementary: Don't set pointer surface to NULL
As we no longer destroy a window's wl_surface during hide requests, we
should not be setting pointer surface to NULL here.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-02 14:25:10 -05:00
Chris Michael def6fe9a39 elementary: Remove useless #ifdef
This block is already wrapped around an #ifdef directly above, so this

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-02 11:15:57 -05:00
Stefan Schmidt 58e13c569b efl_ui_win: fix warning about unused parameter
If the ifdef is not hit this is never being used.
2016-12-02 16:28:31 +01:00
Chris Michael 3a68e9554a elementary: Re-enable wayland_egl mouse pointers
It appears that the 'black square' issue when using wayland_egl canvas
for mouse pointers is gone now, so re-enable the usage of gl pointers
for elementary windows.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-02 09:50:48 -05:00
Jean-Philippe Andre dcaa66812e win: Fix layout issue in E internal windows (WL)
This is an attempt at fixing internal windows in E Wayland,
where the framespace geometry was not taken into account at
render time. Tested in a VM.

Thanks @derekf for the report.

See https://www.enlightenment.org/ss/e-584083fb03f617.08713956.jpg
2016-12-02 17:21:47 +09:00
Jean-Philippe Andre da7281f2ae win: Update min & max size hints simultaneously
Avoid calling the engine's size_min_set/size_max_set functions
while setting the hints on the window object itself (it would
cause min != max even though we intended min == max).
2016-12-01 17:56:18 +09:00
Jean-Philippe Andre 1ed589f8c1 win: Fix main menu visibility with non-default themes 2016-12-01 17:56:18 +09:00
Jean-Philippe Andre 3cb321bf5d win: Improve bug compatibility for E
E has a habit of creating windows with a single content
that has no weight and/or no min size, but still expecting
those windows to size properly and be resizable. This amends
a previous sizing hack (but really it's the same) for logout
dialogs, and adds another hack for EFM windows (single edje
object with no weight, but window should be resizable).
2016-12-01 14:41:06 +09:00
Jean-Philippe Andre a2a28a5658 win: Force opaque region updates on alpha change
What happens is that ecore_wl2 ignores calls to opaque_region_set
if the window has alpha. As a consequence the opaque_region is not
updated server-side and the previous window geometry is kept as
opaque region, even though the window should have alpha.

Thanks @raster for the report.
2016-12-01 13:21:49 +09:00
Jean-Philippe Andre 0dde22488a theme: Add bevel around background (window)
This should fix (some) issues with exactness.
2016-11-30 15:15:02 +09:00
Jean-Philippe Andre 8a40c063ce win: Implement max size hint support
evas_object_size_hint_max() would not work on a window, unless
it somehow managed to not size itself (which would be another
issue). This patch allows apps to call size_hint_max_set() on
a window. A test case is provided in elm_test (Dialog).

@feature
2016-11-30 15:15:02 +09:00
Jean-Philippe Andre a3d2960270 win: Add a little hack to fix E's logout/shutdown dialogs
E creates an edje object, sets it as resize_object, calls
restricted_calc and sets the resulting min size to the window.
But the window min size isn't taken into account when sizing
it, as the window sizes itself. I have no idea how this could
work before my changes.

E never actually requested the edje object to update its size
hints, so the window is left with an object of min size 0x0.

This patch is clearly a hack, but I can't really figure out
what would be the best or proper solution. Other elementary
widgets and containers seem to force edje object's update_hints.

Reproduction case: In E, menu, system, logout.
2016-11-30 15:15:02 +09:00
Jean-Philippe Andre 2102ed9b7c win: Fix opaque regions for Wayland
In Wayland, an opaque window can still have shadow borders, and
only needs to set the opaque_region appropriately. In X on the
other hand, a window needs to be flagged as alpha in order to be
properly blended (otherwise you'd get black borders).

Thanks Derek for the report!

This fixes c91360fcbd
2016-11-30 15:15:02 +09:00
Jean-Philippe Andre 1f9dfe2ed3 win: Move main menu to the framespace
After reverting 8a21384759, I figured out how to move
the main menu back to the border group. This time the menu is in the
framespace and its layout algos have been adapted to allow non-zero
root coordinates.
2016-11-29 16:36:29 +09:00
Jean-Philippe Andre c7f2308e6c Revert "win: Move main menu back to win.edc (fix sizing)"
This reverts commit 8a21384759.
The following commit will reintroduce the menu slot inside the
border edc.
2016-11-29 16:36:05 +09:00
Jean-Philippe Andre 8a21384759 win: Move main menu back to win.edc (fix sizing)
As Andy reported, the main menu geometry is not correct after
my recent changes, as the application contents slide underneath
the menu bar. In fact the menu bar is just floating above
everything else.

So I've tried to move the menu to the framespace (as it should
belong to the frame), but the sizing algos for both the window
and the menu make some assumptions that render this task quite
difficult. Eventually I would like to be able to swallow the
menu somewhere else inside the border... but not right now.
2016-11-28 15:52:09 +09:00
Jean-Philippe Andre 51ba193bda win: Remove unused variable 2016-11-28 13:51:44 +09:00
Jean-Philippe Andre f1418dbb20 win: Avoid calling need_frame_adjust all the time
This function was meant to be called only before
finalize. This avoids getenv and string compares.
2016-11-28 10:57:15 +09:00
Carsten Haitzler 892f4abe37 efl ui win - stop trying to get data of non-image icons
x11 updates trying to update x properties from image data when icon is
not an image is causing lots of error spam. fix this to check type
first before getting data.
2016-11-27 22:50:03 +09:00
Jean Guyomarc'h 2a75a47b19 efl_ui_win: fix build with no support for X 2016-11-24 20:24:19 +01:00
Jean-Philippe Andre 61c8d7f46e win: Disable CSD shadow if alpha and borderless
If the content has alpha, we can't ensure that the square shadow
will look good. So, hide it.
2016-11-24 17:49:17 +09:00
Jean-Philippe Andre 246023d1b3 win: Fix (hack around) E internal windows in Wayland
My previous patches have broken E Wayland internal windows, as
the compositor wants to create Server-Side Decorations[1] but
based on some mysterious heuristics, E will decide to show or
not SSD. It seems the surface geometry, window geometry,
input region and maybe opaque region need to all match. There
was a pixel difference in the theme which broke everything,
also CSD shadows must be turned off in that case.

This also fixes inputs as for some reason a mismatching input
region vs window geometry would break pointer move/up/down in
those internal windows.

[1] I believe this is not a great idea and E should never draw
    any server-side decorations in Wayland. Wayland was supposed
    to mean only CSD, no more SSD.
2016-11-24 17:05:27 +09:00
Jean-Philippe Andre aaaf77965a win: Add quick hack to restore mouse inputs in E Wayland
E Wayland internal windows are a special beast. Somehow all their
events are intercepted by a special input_obj... but never get
propagated back to the elm_win.

Major side-effect: you get 2 window decorations. I believe there is
some dark magic inside E that tries to figure out when to show
a decoration and this conflicts with CSD.

But hey, it's late so I want to "fix" this and figure out the details
later.
2016-11-23 23:53:50 +09:00
Jean-Philippe Andre 72694331b4 win: Fix event forwarder ad//del
On event listener del we were adding one more forward
callback. Copy & pasta error, obviously.
2016-11-23 23:48:53 +09:00
Jean-Philippe Andre ea7bbfe47d win: Factorize code for move_resize
Oops, I probably went a bit overboard with this ~_~
2016-11-23 23:48:53 +09:00
Jean-Philippe Andre 4da634c26f elm: Mark icon as non-atspi
This fixes elm_suite
2016-11-23 14:02:01 +09:00