Commit Graph

169 Commits

Author SHA1 Message Date
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