Page MenuHomePhabricator

implement ignore_events in ecore-evas bufer engine
Closed, ResolvedPublic


Ecore_Evas not ignore resize event if set 'ignore_events'.

Below test code.

 * gcc -o ecore_evas_ignore_events ecore_evas_ignore_events.c `pkg-config --cflags --libs elementary`
#include <stdlib.h>
#include <Elementary.h>
#include <assert.h>

static Eina_Bool is_changed = EINA_FALSE;

_true_job(void *data)
   Ecore_Evas *ee = data;

   is_changed = EINA_FALSE;
   ecore_evas_ignore_events_set(ee, EINA_FALSE); // no matter EINA_FALSE or EINA_TRUE
   ecore_evas_resize(ee, 100, 100);

static void
_resize(Ecore_Evas *ee)
   int w, h;
   ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
   fprintf(stdout, "RESIZE EVENT!!! %s w[%d] h[%d]\n", is_changed ? "EINA_TRUE" : "EINA_FALSE", w, h);

   Ecore_Evas *ee;

   ee = ecore_evas_new(NULL, 0, 0, 200, 200, NULL);
   ecore_evas_callback_resize_set(ee, _resize);

   ecore_job_add(_true_job, ee);

   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
rimmed created this task.Oct 4 2016, 8:00 AM
rimmed updated the task description. (Show Details)Oct 4 2016, 8:02 AM
rimmed added a subscriber: artem.popov.
rimmed triaged this task as High priority.Oct 4 2016, 8:06 AM
rimmed updated the task description. (Show Details)
stefan_schmidt edited projects, added efl; removed Bug Report.Feb 10 2017, 6:04 AM

@stefan_schmidt why you remove tag Bug Report? This tag was created specially for mark task as bug. It's help to filter and sort tasks.

Added it back. Got lost when I added the actual project it applies to which is also used for filtering. :)

I had a look at this. The doc already states that the implementation on what events are ignored are depending on the window system. I looked into the ecore_x case and we there are many events we are not filtering even if this flag is used. The docs are not really saying anything about it but it seems this events ignore is not to be used for all event types.

The resize event certainly being one of them. I added the ignore check to _ecore_evas_x_event_window_configure function which resulted in what you wanted, no events being reported, but it also broke updating the window content during resizes. For me this looks like it as is be design. Maybe we would need to update the docs in this case to make it clearer.

Calling on the wizards here as I'm not really familiar with the design goals for ignore_event. @raster, @cedric @jpeg how is this supposed to work? Is ignoring the resize events with this actually desired or even possible?
For me it looks like not and we could close this as invalid with some doc fix. But I would like to get a confirmation here first.

jpeg added a comment.Apr 5 2017, 11:47 PM

Sorry, I don't know enough about this specific topic... But it sounds indeed like each engine will have a different behaviour and changing anything might lead to behaviour breaks :(

jpeg lowered the priority of this task from High to Wishlist.Jul 12 2017, 12:49 AM

From the doc:

* @warning Support for this depends on the underlying windowing system.

Honestly this just sounds like a bad API overall. I believe the buffer engine is the one you are interested in, and that engine just doesn't implement ignore_events at all. This would be a nice feature to have, but until then this is really just wishlist.

zmike edited projects, added Restricted Project; removed efl.Jun 11 2018, 6:59 AM
bu5hm4n edited projects, added efl: rendering, efl: layout engine, efl: display system; removed Restricted Project.Jun 11 2018, 8:19 AM
zmike renamed this task from Ecore evas not ignore events properly to implement ignore_events in ecore-evas bufer engine.Jul 24 2018, 10:26 AM
zmike raised the priority of this task from Wishlist to TODO.
zmike edited projects, added Active Work Proposal; removed Voting.Aug 20 2018, 4:55 AM