Commit Graph

149 Commits

Author SHA1 Message Date
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
Jean-Philippe Andre 10e2b4417c win: Simplify elm_win_util_dialog_add
This now uses a similar code path as standard windows. Shouldn't
there be an EO class for dialogs, too?
2016-11-23 13:04:13 +09:00
Jean-Philippe Andre 0fc049a321 win: Move modal blocker to border group
Legacy themes are still supported with a fallback code.
2016-11-23 13:04:13 +09:00
Jean-Philippe Andre 60308d7421 win: Code simplification 2016-11-23 13:04:13 +09:00
Jean-Philippe Andre 29e7d477b1 win: Simplify modal legacy API and add test case
This fixes the modality of windows shown after setting
the flag.
2016-11-23 13:04:13 +09:00
Jean-Philippe Andre 0de72b44c1 win: Fix support for legacy themes (elm_bg)
For standard windows, we want to create an elm_bg object if
the theme is a legacy one. Otherwise the default theme
doesn't require an extra object, just a rectangle.
2016-11-23 13:04:13 +09:00
Jean-Philippe Andre 8c505e3191 win: Remove menu from EDC group (fixes compatibility)
This fixes compatibility with legacy themes (ie. every single
theme in existence beyond the default one, for now), by checking
where to swallow the menu widget. If a legacy theme is used,
the legacy swallow should be used, and it will all look correct.

Moving forward I hope to get rid of the internal edje object
entirely, except for compatibility reasons.
2016-11-23 13:04:13 +09:00
Jean-Philippe Andre fc4c07e735 win: Add frame to inline and socket windows
This simplifies the cases by adding a border edje on all
windows except fake (damn fake windows). Shadows and borders
are always disabled on such windows (but we could easily change
that in the future).
2016-11-23 13:04:13 +09:00
Jean-Philippe Andre 5f6673f623 win: Implement unresizable mode (fixed size windows)
This sends a signal to the CSD frame to hide the bottom
bar and disable the resize borders.
2016-11-23 13:04:13 +09:00