Commit Graph

349 Commits

Author SHA1 Message Date
Chris Michael 09a3290c54 Define Ecore_Wl_Input_Group and Ecore_Wl_Dnd_Group for doxy
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-28 11:48:51 +01:00
Chris Michael 4c88eb0325 Add missing 'void' for function declaration.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-28 11:48:51 +01:00
Chris Michael a85a196e4a deprecate badly named ecore_wl_dnd_drag_start function.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-28 11:48:50 +01:00
Chris Michael 8c9353e3ec Use ecore_wl_window_surface_find to get the Ecore_Wl_Window.
NB: This is needed because some compositors like Weston are expecting
the wl_surface user_data to be a buffer, not some arbitrary data.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-21 10:49:40 +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 2a20ca4477 ecore_evas/wayland: Do not send additional mouse_in's.
If this Ecore_Evas already has a mouse inside it, there's no need to
send an additional mouse in event.

Additionally, always send a mouse_move event before a mouse_down, so the
Evas pointer position can be updated properly before the mouse down.
2013-05-08 16:56:12 -03:00
Rafael Antognolli d4b7389f3a ecore/wayland: Store the multi position per device/finger.
This will make every touch point have its position updated on
multi_move, and then it can be used to send a correct multi_up event.
2013-05-08 16:50:15 -03:00
Rafael Antognolli c18e76eb2c ecore/wayland: Report correctly the device which emitted the mouse event. 2013-05-08 16:50:15 -03: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 de4173ee0a ecore/wayland: Add support for engine animated cursor. 2013-04-23 18:52:35 -03:00
Igor Murzov 1373f0ba4a Fix incorrect printf format usage 2013-04-16 12:07:36 +04:00
Chris Michael 6380cf1bf1 Fix formatting.
Declare variables in the proper place.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-04-11 06:33:30 +01:00
Rafael Antognolli 2d62ea88e5 ecore/wayland: Add support for double and triple click.
It's implemented exactly the same way as on the X11 backend. It does
handle multiple devices, though may need some adjustments when
multi-touch is added, since there's no support for multi-touch on
EFL-wayland yet.
2013-04-10 14:53:14 -03:00
Rafael Antognolli 133e3e38f0 ecore/wayland: Sync before assuming that there's no output.
This will make the mainloop block waiting for the output info, if it's
not there yet, but it's better than just returning with no screen size.
2013-04-05 17:26:00 -03:00
Rafael Antognolli e38c985cd0 ecore/wayland: Actually wait for the sync callback on ecore_wl_sync().
The wl_display_sync() request doesn't really wait for all the requests
to be processed, but instead sends a request for the "done" event.
Wayland relies on the fact that the requests are processed in order, so
when the "done" event is received, it means that all the other requests
requested prior to the respective "sync" have been processed already.

This commit makes the ecore_wl_sync() call actually wait for its "done"
event (thus blocking the ecore mainloop).
2013-04-05 16:31:43 -03:00
Rafael Antognolli 97d06e5b3f ecore/wayland: Fix screen geometry when it is rotated.
Width and height should be swapped when the screen is rotated by 90 or
270 degrees.

Additionally, add a command to the ecore_evas_window_sizes_example which
returns the screen geometry.
2013-04-02 17:27:39 -03: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
Eduardo Lima (Etrunko) a8c63de55a Add missing Ecore.h include
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
2013-03-21 16:32:13 -03:00
Christopher Michael abd79fff9b Fix formatting.
Remove call to display_dispatch (not needed here during init).

Signed-off-by: Christopher Michael <cp.michael@samsung.com>
2013-03-12 12:52:25 +00:00
Chris Michael fb8842bc24 Formatting fix.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-03-05 11:53:23 +00:00
Christopher Michael a37443ad87 Remove display_dispatch call (not needed here).
Signed-off-by: Christopher Michael <cp.michael@samsung.com>
2013-03-05 09:24:48 +00:00
Christopher Michael be94e53126 Fix formatting.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>
2013-03-05 09:20:33 +00:00
Rafael Antognolli 71b1576bc5 ecore/wayland: Adjust @since versions to 1.7.6.
Since these API's were backported to 1.7.6, we must fix the doc strings.
2013-02-28 18:18:31 -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 a158958267 ecore/wayland: Always send the mouse button event.
Don't send only the mouse button stored inside input->button, since more
than one button may be pressed and unset the input->button when
unpressed.

SVN revision: 83647
2013-02-05 18:21:33 +00:00
Eduardo Lima (Etrunko) 251544ad7e Fix return of ecore_wl_outputs_get() function
This should return the pointer to the list, to get the desired behavior.
Fixes ticket #2252.

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>



SVN revision: 83644
2013-02-05 17:23:38 +00:00
U. Artie Eoff a2197ce503 Export API to C++, add wl_registry and global accessors
Add #ifdef __cpluscplus to Ecore_Wayland.h so the API can be used by C++
programs.  Add accessors for the wl_registry and the globals list.

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>

Patch by: "U. Artie Eoff" <ullysses.a.eoff@intel.com>



SVN revision: 83642
2013-02-05 16:53:31 +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
Christopher Michael aa1f8b4eac Let's do malloc the EFL way here.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 83320
2013-01-25 07:19:48 +00:00
U. Artie Eoff c36058806a Cache wayland globals
Store the wayland registry globals in a list so that we can bind to them from a
user/test program. When a custom interface (protocol extension) is used in a
wayland compositor, this allows user/test program to use that interface. For
instance, one might provide a custom wayland test protocol that give access to
otherwise hidden/missing functionality that allows effective automated testing
(in wayland engines). See the Weston unit test suite for an example of this
concept.

Patch by: "U. Artie Eoff" <ullysses.a.eoff@intel.com>



SVN revision: 83312
2013-01-24 22:03:22 +00:00
Eduardo de Barros Lima 08b96ebc1c Move typedef enum declarations after the enum to make g++ happy.
When compiling a C++ program that includes Ecore_Wayland:

Ecore_Wayland.h:56:14: error: use of enum ‘_Ecore_Wl_Window_Type’ without previous declaration
Ecore_Wayland.h:56:56: error: invalid type in declaration before ‘;’ token
Ecore_Wayland.h:57:14: error: use of enum ‘_Ecore_Wl_Window_Buffer_Type’ without previous declaration
Ecore_Wayland.h:57:70: error: invalid type in declaration before ‘;’ token

This patch fixes ticket #2217.



SVN revision: 83310
2013-01-24 21:35:06 +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
Christopher Michael 9f0e2fc7e8 Fix some minor formatting in Alex Wu's cpu patch.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 81361
2012-12-19 13:58:52 +00:00
Christopher Michael 58304e01ab ecore-wayland: (version 2)Fix monitoring ECORE_FD_WRITE defaultly on wayland display fd lead to 100% cpu usage
In ecore_wl_init(), adding wayland display fd with ECORE_FD_WRITE
flag make CPU usage 100%. The proper way to monitor the ECORE_FD_WRITE
is when the wl_display_flush() return value < 0 and errno == EAGAIN.
And if wl_display_flush() return, we remove ECORE_FD_WRITE flag from
the display fd.

Change from v1:
Add idle enterer destroy code into _ecore_wl_shutdown() to avoid
using freed wl_display.

SVN revision: 81360
2012-12-19 13:58:48 +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
Alex Wu a3f102f742 Reverting 80476 and 80479. This solution is flawed and causes some weird
collateral damages that need further investigation. All programs running with
wayland engines are consuming 100% CPU.

ecore-wayland: Fix monitoring ECORE_FD_WRITE defaultly on
   wayland display fd lead to 100% cpu usage

  In ecore_wl_init(), adding wayland display fd with ECORE_FD_WRITE
  flag make CPU usage 100%. The proper way to monitor the ECORE_FD_WRITE
  is when the wl_display_flush() return value < 0 and errno == EAGAIN.
  And if wl_display_flush() return, we remove ECORE_FD_WRITE flag from
  the display fd.

  Patch by: Alex Wu <zhiwen.wu@linux.intel.com>


SVN revision: 80981
2012-12-14 19:00:53 +00:00
Alex Wu 4c534eb0e0 ecore-wayland: Fix monitoring ECORE_FD_WRITE defaultly on
wayland                display fd lead to 100% cpu usage

In ecore_wl_init(), adding wayland display fd with ECORE_FD_WRITE
flag make CPU usage 100%. The proper way to monitor the ECORE_FD_WRITE
is when the wl_display_flush() return value < 0 and errno == EAGAIN.
And if wl_display_flush() return, we remove ECORE_FD_WRITE flag from
the display fd.

Patch by: Alex Wu <zhiwen.wu@linux.intel.com>



SVN revision: 80476
2012-12-07 17:38:21 +00:00
Vincent Torri a3562c0173 ecore: whitespaces--
SVN revision: 80017
2012-12-03 07:37:17 +00:00
Vincent Torri 7d6010b12c merge: add escape ecore, fix several bugs
SVN revision: 79995
2012-12-02 22:35:45 +00:00