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>
The "compose" component of the ecore input events must be translated to
the correct value when CTRL keys are pressed. This implementation was
copy & pasted from the xcb backend.
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>
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>
keypress, but rather Only on they actual modifier event.
Add some printf debugging for Non-Printables like Ctrl, etc
Signed-off-by: Chris Michael <cp.michael@samsung.com>
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>
not function.
Add Dnd Offer and Dnd End events.
Add a new window type (dnd).
Add new functions for dnd
Signed-off-by: Chris Michael <cp.michael@samsung.com>
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>
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.
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.
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.
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.
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>
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.
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).
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.
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>
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
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
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
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
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
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
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
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
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
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
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
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