Commit Graph

176 Commits

Author SHA1 Message Date
Sebastian Dransfeld 0223d0cee3 ecore_evas: No error if window creation fails
It is common that some types of ee's will fail as the underlying system
does not support it, just warn.
2013-11-21 10:51:25 +01:00
Chris Michael e28d54d3e4 Unify ecore_evas resize code across both shm and egl engines.
This reduces code duplication for ecore_evas resize routines inside
wayland engines by using a common _ecore_evas_wl_common_resize
function as the resize code for both engines was the same anyway.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-15 08:11:09 +00:00
Chris Michael bc6711b229 Add function prototype for _ecore_evas_wl_common_resize
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-15 08:10:15 +00:00
Chris Michael a55a8ed3fb Fix some formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-14 12:45:33 +00:00
Cedric BAIL aaae3830f0 ecore_evas: use portable infrastructure to detect page size. 2013-11-10 09:26:44 +01:00
Rafael Antognolli 8b852ad21e ecore/wayland: Set win->resizing flag inside ecore_wl_resize(). 2013-11-01 15:51:14 -02:00
Rafael Antognolli 6aa11cf89d ecore/wayland: Set win->moving from inside ecore_wayland.
We can set it from the ecore_wl_window_move() function, instead of
directly changing the attribute.
2013-11-01 15:07:53 -02:00
Rafael Antognolli 839a737a62 ecore(_evas)/wayland: Move frame callback to engine data.
It's something specific to the ecore_evas engine/module, so there's no
need to keep this info in the Ecore_Wl_Window.
2013-11-01 15:07:53 -02:00
Rafael Antognolli 1c33a1a57b ecore/wayland: Add title_set and class_name_set APIs.
These two APIs will save the title and class_name inside
Ecore_Wl_Window, so if they are called before the shell surface is
created, the stored names will be used later when the window is finally
shown (shell surface is created).

This way we are also hiding the shell surface from ecore_evas modules.
2013-11-01 15:07:48 -02:00
Rafael Antognolli a63c69cac5 ecore_evas/wayland: Do not update opaque region to the same value.
This should not be necessary, since it's setting exactly the same
current opaque region. Changing the opaque region might be needed, but
not here.
2013-11-01 10:43:53 -02:00
Rafael Antognolli 277a5915c1 ecore/wayland: Remove attributes that are not used anymore.
Some attributes might have been useful in the past, but not anymore.
Just remove since they are not been used anywhere.
2013-11-01 10:30:29 -02:00
Chris Michael 81a847a74d Fix compiler warning: Need to define _state_update function early as
it is used in various places later.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-01 08:41:30 +00:00
Rafael Antognolli 1deb107d56 ecore/wayland: Do not store "edges" in Ecore_Wl_Window.
This is a configure event info, so put it in the right place. Some
places adding edges info were also removed, which means that they were
redundant.

Tested with <Meta> + middle click resize, and with window border resize,
on all the edges. Apparently, nothing breaks.
2013-10-31 21:35:13 -02:00
Rafael Antognolli dd18206d86 ecore/wayland: Do not use win->id directly.
Use a getter for it instead, so we don't need to expose the
Ecore_Wl_Window struct just because of it.
2013-10-31 21:35:13 -02:00
Chris Michael 20f6676eb6 Ok, This actually fixes maximized state properly now :) Basically, we
still need to account for frame height, but not frame width when we
are maximizing.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-10-31 17:21:33 +00:00
Chris Michael c96cc485ab Fix ecore_evas_wayland maximized support to function properly
Previously, a "maximize" of an efl client would not actually resize to
the provided size as it would account for framespace width & height.
This fixes that so now "maximize" is Actually maximized.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-10-31 16:58:21 +00:00
Chris Michael 1a5bdb4088 Implement ability to call the ecore_evas state_change function if
needed.

NB: Currently, this will only work for fullscreen or maximized states
as other ones like sticky, withdrawn, iconic, etc, etc are not
supported via wayland protocol yet.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-10-31 11:48:59 +00:00
Chris Michael fd0c3f10f6 whitespace--
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-10-31 11:48:59 +00:00
Chris Michael 927358915a Call _ecore_evas_mouse_move_process function on mouse_in and mouse_out
events.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-10-31 11:48:59 +00:00
Chris Michael 40a2dfc870 On a focus_in event, if the ecore_evas already has focus, don't resend
a focus in. Similar change for focus_out also.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-10-29 08:41:48 +00:00
Chris Michael 49dfea5566 If mouse is already inside the ecore_evas, then we don't need to call
the mouse_in function of the ecore_evas.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-10-29 08:05:32 +00:00
Rafael Antognolli ccdeae7ce4 ecore/wayland: Use sync callback to report end of ecore_wl_init().
At the end of the ecore_wl_init() function, send a sync request to the
server, and add a callback listener to the "done" event. When this event
is received, we are sure that all the registry bind requests done so
far were processed already, and that the registry and globals are
available and can be used.

Now, on the functions that request interfaces or registry, we call
_ecore_wl_init_wait(), which will check if the callback was received
already (that means that all requests inside the init were processed).
If it was not yet, then we wait until receiving that callback, before
returning the requested data.
2013-10-28 14:47:33 -02:00
Rafael Antognolli ad731e8b21 Revert "change init done bindings."
This reverts commit b87afd1b94.

Wrong branch, wrong commit.
2013-10-28 14:46:40 -02:00
Rafael Antognolli b87afd1b94 change init done bindings. 2013-10-28 14:07:25 -02:00
Carsten Haitzler a3aa1ed7f0 ecore-evas - handle mouse out then in due to click-to-focus passive grabs 2013-10-19 02:46:25 +09:00
discomfitor 73bd605b7f cosmetic/logic move evas_sync call into same if block when applying alpha settings that might be deferred 2013-10-16 17:57:07 +01:00
Carsten Haitzler 06c3c0cd0c async render -> alpha set. if not visible dont WAIT. do it now. 2013-10-17 00:00:05 +09:00
Carsten Haitzler e309967384 Revert "ecore_evas: window does not go back to normal state if you set iconified to EINA_FALSE."
This reverts commit 9bfb730ff5.

wrong! on deiconify this will now FORCE a ACTIVATE request to the wm
(which asks the wm to focus the window/hilight it and make it active.
might switch desktops or whatever). this is wrong. de-icoifying a
windows does NOT mean ALSO activating it!. the log message also doesnt
say what "go back to normal state"... means.... do they expect/INSIST
windows MUSt be focused after de-iconification? that's wrong as it's a
window management FOCUS policy, not something to do in the lib.
2013-10-15 10:45:37 +09:00
Michal Jagiello 9bfb730ff5 ecore_evas: window does not go back to normal state if you set iconified to EINA_FALSE.
Reviewers: cedric, raster, Hermet

Differential Revision: https://phab.enlightenment.org/D245

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-10-14 12:10:19 +09:00
Chris Michael 592076e319 Reset window opaque region on 180 degree flips also.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-17 08:27:15 +01:00
Chris Michael d8ec30d7cf Call common rotation code before setting engine info
NB: Part of Phab T359 fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-17 07:41:08 +01:00
Chris Michael 70db3bff95 Rework common rotation code to match X11 more closely.
NB: Part of Phab T359 fix.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-17 07:41:08 +01:00
Chris Michael ec76c76f74 Restore old functionality of ecore_evas_alpha_set.
NB: We will still create all new canvases as alpha by setting it in evas,
however this allows the 'state' of ecore_evas_alpha_set/get to retain
it's original functionality and thus accurately report what a client
application May have set alpha value too.

NB: Fixes Phab Ticket T350

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-10 14:37:17 +01:00
Chris Michael 609941e0fa Create any wayland canvases as Alpha by default now.
Remove calls to ecore_wl_window_update_size inside the alpha &
transparent_do functions (this call not needed here anymore).

NB: This is needed due to recent frame "fixes". Basically, even tho we
set the opaque region correctly on a surface now, if the canvas itself
is not alpha, then we will end up with a black "spacer" around the
window.

NNB: Tested Both engines with terminology (both translucent and not) and also the window state test in elementary.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-04 14:25:50 +01:00
Chris Michael 517f8fe2b1 Update ecore_evas wayland_egl for removal of server_allocation member.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 09:06:53 +01:00
Chris Michael 781b3844b1 Update ecore_evas wayland_shm routines for removal of
server_allocation member.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 09:06:53 +01:00
Chris Michael 69be933627 Update common routines for removal of server_allocation field.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 09:06:53 +01:00
Chris Michael 6f5f9d075d Reduce duplicated code for setting resize edges.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-21 08:31:29 +01:00
Chris Michael 5c2eadea98 Reduce duplicated code for setting engine resize edge
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-21 08:31:11 +01:00
Chris Michael 21f0ad4f0e Add function prototypes for resize_edge_set.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-21 08:30:52 +01:00
Chris Michael 2c9a19503f Add function for setting/resetting window resize edges to remove
duplicated code.
Resize the frame object before we update the window saved size.
Remove (again) call to _ecore_evas_wayland_resize and set the resize
edge of the window.

NB: The call to _ecore_evas_wayland_resize ends up sending duplicate
configure events here, hence whey it is removed.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-21 08:28:48 +01:00
Rafael Antognolli ffa9d69180 Revert "Remove Call to _ecore_evas_wayland_resize on a configure event."
This reverts commit 5eeb820b0f.
2013-08-21 12:55:14 -03:00
Chris Michael 5eeb820b0f Remove Call to _ecore_evas_wayland_resize on a configure event.
NB: Not sure how/why this was here, but it's entirely Not needed and
leads to duplicate calls of wl_shell_surface_resize.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-16 11:31:53 +01:00
Stefan Schmidt 91426926c5 ecore_evas: Fix potential NULL dereference.
We don't want to execute any of the function below if t is NULL. Its not
only about strdup but alsa ecore_x_netwm_name_set which might dereference it.

CID 1039400
2013-08-07 15:38:35 +01:00
Mike Blumenkrantz 5d1dec17b3 ecore-evas-x no longer tries making x calls on deleted windows when trying to free its sync counter 2013-08-01 12:17:58 +01:00
Chris Michael d65c357b39 During a call to ecore_evas_show (using wayland_shm), we can avoid
erroneous calls to engine_setup code if we check surface validity.

NB: Short Version: Don't reassign surface if we don't need to.

NB: Prior to this, during a call to ecore_evas_show we would always
Reset the evas engine data (which was basically triggering code to
tear down and reconstruct all the engine internals including the
buffers and the swapper). By checking surface validity first, we can
potentially avoid all that teardown and reconstruction Thus resulting
in faster "show" speed.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-25 15:48:40 +01:00
Mike Blumenkrantz 569b2fd86a ecore-evas-x no longer uses X windows after receiving a destroy event 2013-07-24 14:01:03 +01:00
Chris Michael cc596a3588 If the init count is >= 1, then we want to iterate (ecore_imf wayland
module adds an extra init).

Fix some formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-23 07:15:19 +01:00
Chris Michael 9a4fc9ad44 Add engine interface code for:
- ecore_evas_pixmap_visual_get
- ecore_evas_pixmap_colormap_get
- ecore_evas_pixmap_depth_get
Assign interface functions for above when creating the new interface.
When creating the pixmap, store the visual and colormap for later
retrieval.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-11 10:49:25 +01:00
Chris Michael fc9ee11462 Add visual and colormap to pixmap structure
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-11 10:49:25 +01:00