Commit Graph

41 Commits

Author SHA1 Message Date
Rafael Antognolli 0258a7c466 ecore/wayland: Add subsurface handling APIs. 2013-09-23 11:03:23 -03:00
Chris Michael 43fda7c835 Add API functions for window_rotation set/get and Fix Protruding surfaces on rotated, opaque windows
Phab Ticket T359
https://phab.enlightenment.org/T359

NB: When setting the window opaque region, take into account any
existing window rotation, and set opaque region accordingly.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-17 07:41:08 +01:00
Chris Michael bd4d6cb6cc Also reset opaque region is transparent is toggled.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-11 14:13:53 +01:00
Chris Michael dc01222858 Add back saving of opaque region into window structure.
NB: Needed so that we can reset the opaque region if alpha_set is
being toggled on/off all the time.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-11 14:10:27 +01:00
Chris Michael 369f414726 Remove calls to update_size function in alpha_set and transparent_set.
In alpha_set & transparent_set, add call to set opaque region to NULL
if alpha or transparent.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-10 14:37:17 +01:00
Chris Michael 6ab1bd2f71 Set surface opaque region to NULL if window is transparent/alpha.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-04 14:24:04 +01:00
Chris Michael cf7c9b9d6b Added functions for setting input and opaque regions on a window.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 09:25:58 +01:00
Chris Michael f8d6a9561d Don't use Eina_Rectangles for server and saved allocation, can just
use ints for width & height.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 09:06:53 +01:00
Chris Michael 9bdda19eaf Remove calls to saved input & opaque region of window.
We don't record these regions anymore. They were removed from the
window structure.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 09:06:53 +01:00
Chris Michael 6337b63977 When updating window size, if the stored allocation size is the same
as being set, then get out.

This reduces unnecessary calls to resetting the input & opaque regions
if nothing has changed in terms of size.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-21 08:27:45 +01:00
Mike Blumenkrantz 86b61b41d1 ecore_wl sets input regions more accurately when resizing 2013-08-20 14:49:21 +01:00
Chris Michael 8e92e10088 When we create a wl_surface for the window, set the surface_id field
of the window structure.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-20 14:45:49 +01:00
Chris Michael 0de4add074 Remove dead code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-20 14:45:49 +01:00
Chris Michael d163e5df1f Check for valid windows hash before searching it.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-01 12:50:41 +01:00
Chris Michael 8f11c31396 During ecore_wl_window_pointer_set (called from
ecore_evas_object_cursor_set), assign the pointer properties to the
window structure so they can be applied on pointer_enter events.

NB: Phab T230

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-23 07:15:20 +01:00
Chris Michael dd939bf587 Add some additional trapping around window_show for cases where a
wl_shell has not been bound yet

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-16 11:16:44 +01:00
Chris Michael a665e6320f Remove call to wl_display_get_serial as it's a server-side function,
not client-side.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-24 09:15:34 +01:00
Chris Michael f833318fb2 Use wl_display_get_serial when creating popups.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-24 08:52:50 +01:00
Chris Michael 01ed63f4bd Remove 'hack' which worked around a Weson bug wrt pointer setting
during dnd operations (by setting surface_user_data to buffer)

NB: This bug was fixed in Weston, so this workaround is not needed
anymore

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-06-17 23:22:19 +01:00
Chris Michael f43ac1a181 EFL Formatting.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-13 07:00:09 +01:00
Eduardo Lima (Etrunko) 734e52d011 ecore_wl: Handle ECORE_WL_WINDOW_TYPE_NONE correctly
Also changes the default window type to ECORE_WL_WINDOW_TYPE_TOPLEVEL as it is
the most used case. If someone needs another type, set it manually.

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
2013-06-12 17:40:02 -03:00
Chris Michael cf8e054889 Add private function to get the window hash.
When destroying window, also destroy animator callback.
Change ecore_wl_window_damage function to Only do damage.
Add separate ecore_wl_window_commit function to push those accumulated
damages.
In ecore_wl_window_surface_create, if the window already has a
surface, return that ... Not Null.
During window show, only create a shell_surface if it does not Already
exist.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-07 15:42:53 +01:00
Chris Michael 0950237f04 Don't create a shell surface for DND window types.
Set surface_user_data in attach function to be the buffer we are
attaching (NB: Expected by some compositors like weston).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-28 11:48:51 +01:00
Chris Michael d7cbc84aa8 Add function to get a Ecore_Wl_Window from a wl_surface.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-21 10:46:04 +01:00
Rafael Antognolli 494d53daa2 ecore_wayland: Simplify handling of opaque regions.
Move this handling entirely into ecore_wl_window_update_size() and
create and set it whenever it is necessary. There's no need to keep a
pointer on the Ecore_Wl_Window struct.
2013-05-06 20:25:17 -03:00
Rafael Antognolli 13c0e8f3f3 ecore/wayland: Fix alpha windows on EGL backend.
Now the opaque and input regions are updated on ecore_wl_window_resize,
there's no need to call ecore_wl_window_buffer_attach() for this
anymore.

The checks on alpha and transparent flags were also fixed.

ecore_wl_window_update_size() is now called by ecore_wl_window_resize(),
reducing duplicated code.
2013-05-06 16:46:20 -03:00
Rafael Antognolli 7a7a0b8297 ecore/wayland: Add ecore_wl_window_alpha_set().
Just sets the "alpha" flag on the window and use it when calculating
opaque regions.
2013-05-06 16:40:50 -03:00
Chris Michael 9372a1e217 Revert "Reduce duplicated code and comment out region_add sections that are"
This reverts commit 279c5ac28e.

This broke rotation (and some other things).
2013-05-01 07:32:10 +01:00
Rafael Antognolli 1f58a59a61 ecore_evas/wayland: Remove hack for changed state.
Since we don't have a changed state callback on Wayland, just call the
changed_state callback of Ecore_Evas from the configure callback.
There's no need to add the Ecore_Job that will send the event later.

This makes the code cleaner, simpler, and will call the callback when
the configure event is received, which is a good place to check for the
changes.
2013-04-30 16:31:43 -03:00
Rafael Antognolli a9b500370a ecore/wayalnd: Add some getters to ecore_wl_window. 2013-04-30 16:31:35 -03:00
Chris Michael 279c5ac28e Reduce duplicated code and comment out region_add sections that are
not needed.
During buffer_attach, just call window_damage function which already
handles surface_damage & commit.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-30 14:55:54 +01:00
Rafael Antognolli f5f589429e ecore/wayland: Destroy the frame_callback on window_free. 2013-04-02 14:40:00 -03:00
Eduardo Lima (Etrunko) 19561c6112 Ecore_Wayland: Add ecore_wl_window_surface_create() API
On some use cases, it is necessary to create a new wl_surface without
associating it to a wl_shell_surface. This new API makes it possible.

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
2013-03-26 15:51:41 -03:00
Christopher Michael 3bf37fb3b8 Free any old input or opaque regions if they exist (regardless of the existance of a surface).
Signed-off-by: Christopher Michael <cp.michael@samsung.com>
2013-02-19 10:18:02 -03:00
Rafael Antognolli db268ceb43 ecore/wayland: Don't use edge info for resizing in some cases.
Maximized/fullscreen will handle the repositioning of the window by
themselves, and restore the window to its original position when coming
back from that state. So there's no need to use the edge information and
manually adjust the window offsets.

SVN revision: 83779
2013-02-08 11:50:09 +00:00
Rafael Antognolli 74cb944f25 ecore/wayland: Add window state changed callback to Ecore_Wl_Window.
This will allow it to report to Ecore_Evas that the window has changed
its state. Elementary uses this to update its maximized/fullscreen/other
window states internal information.

The code that uses this callback is also added to Ecore_Evas.

SVN revision: 83625
2013-02-05 12:19:40 +00:00
Alex Wu 41308aa729 From: Alex Wu <zhiwen.wu@linux.intel.com>
Date: Sat, 5 Jan 2013 10:50:19 +0800
Subject: [PATCH] ecore-wayland: Improve opaque setting logic.

1. Update win->region.opaque in ecore_wl_window_update_size, so that
the opaque info is synced with the geometry.

2. Add win->surface checking in ecore_wl_window_buffer_attach
before send any wl_surface related request, it will avoid segfault
in case that calling ecore_wl_window_buffer_attach() before
ecore_wl_window_show().

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 82385
2013-01-08 07:21:47 +00:00
Christopher Michael 67769cc39f ecore-wayland: Improve opaque setting logic.
1. Update win->region.opaque in ecore_wl_window_update_size, so that
the opaque info is synced with the geometry.

2. Add win->surface checking in ecore_wl_window_buffer_attach
before send any wl_surface related request, it will avoid segfault
in case that calling ecore_wl_window_buffer_attach() before
ecore_wl_window_show().

SVN revision: 82384
2013-01-08 07:21:32 +00:00
Gustavo Sverzut Barbieri 05212a3d0e efl/ecore_wayland: move docs to header.
SVN revision: 81832
2012-12-28 19:36:01 +00:00
Jonas M. Gastal e3ae81e65f efl: Created Ecore group and added existing Ecore groups to it.
SVN revision: 81293
2012-12-18 18:38:44 +00:00
Vincent Torri 7d6010b12c merge: add escape ecore, fix several bugs
SVN revision: 79995
2012-12-02 22:35:45 +00:00