Commit Graph

268 Commits

Author SHA1 Message Date
Carsten Haitzler e9037af871 menus - fix position of menus when broiught up with key bindings
on other screens the menus were ... wrong - coords were not right
(previous commit)b ut then scroll-to-fix also moved them badly. this
is now fixed too.

@fix
2020-12-13 22:27:14 +00:00
Carsten Haitzler 397a58137e e menus - keep parent menu items activated when browsing child items 2020-10-01 17:59:26 +01:00
Elyes HAOUAS b980034665 tree-wide: get rid of trailing whitespace (part 2)
Remove trailing whitespaces

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11821
2020-05-14 13:49:11 +02:00
Carsten Haitzler 306632a21c e menus - dont double unref/free a menu
e_menu_item_submenu_set() already unrefs the previous submenu...
2020-05-11 11:14:53 +01:00
Carsten Haitzler 33dfe6899c menus - ensure submenus deacivate when parent does 2020-05-02 15:20:51 +01:00
Carsten Haitzler 3d413eea68 fix menus to jump content onto screen better without side-effects
fixes T8680

@fix
2020-04-24 18:58:45 +01:00
Carsten Haitzler 0329696423 menu - handle invalid access to menu if already active
asan helped find this

@fix
2020-01-24 23:01:11 +00:00
Carsten Haitzler e49f4f8de1 e menu - fix type for setting fill to wrong obj... 2019-08-22 19:50:14 +01:00
Carsten Haitzler b7d2ac57b0 freeze/that - use a bit more to cut out unwanted events 2019-08-20 08:42:55 +01:00
Carsten Haitzler 5b5b3005f6 e menu - remove excessive events and eo calls from menu init
so dropping a bit of overhead/latency for e menus here - this isn't to
the extent of a cache for menu objects/items... but it's just nuking
useless calls to do things not used or that can be done in fewer calls
as well as ordering things to we don't emit events and handle them
multiple times or calc min size multiple times etc. etc. -
adds a test case we can enable for perf testing too.
2019-08-01 10:39:29 +01:00
Carsten Haitzler 1967257dc7 e menu - fix grab and ungrab and forced hide all with desklock
found a valgrind issue and an input issue all in one... this fixes
that with no more valgrind complaints and input works if e menu is up
whilst desklock kicks in.

@fix
2019-07-31 13:38:50 +01:00
Carsten Haitzler 2bf682ff5f e menus - fix ungrabbing to ungrab when no active menus are visible
if there are active menus that are not visible the gab may stay- this
fixes that to release that grab when no menus are visible anymore.

@fix
2018-10-18 16:58:51 +01:00
Carsten Haitzler b92b546d36 e menu - allow hold mode to be turned off
hold mode is where if u hold mosue down menu stays only as long as
mouse is held down... then dismissed on up. doesnt work well when youa
re trying to overload a single click with longpresses and so on -
optionally turn it off. used in gadgets.
2018-10-17 14:35:49 +01:00
Chris Michael f2e0e2d785 enlightenment: Ensure we have a valid menu comp object before calling
Summary:
evas functions

This fixes an issue when quickly mousing through menus can cause a
segfault in Enlightenment due to menu->comp_object being NULL

ref T7030

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric

Tags: #efl, #enlightenment22

Maniphest Tasks: T7030

Differential Revision: https://phab.enlightenment.org/D6641
2018-07-25 14:59:36 -04:00
Mike Blumenkrantz a6277f4f6d resolve a number of cases where a null object was passed to efl functions
Summary:
these are all harmless but will trigger error messages from efl

ref T7030

Depends on D6315

Reviewers: ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Tags: #enlightenment-git

Maniphest Tasks: T7030

Differential Revision: https://phab.enlightenment.org/D6316
2018-06-19 12:01:43 -04:00
Thanatermesis 3d9044a9fc improved default size for icons in menus that looks pixelated 2018-01-04 20:22:42 +00:00
Chidambar Zinnoury 0666cd7249 e menu: Fix missing realize when using key-activation to the right.
See commit 474463ef6c, SVN r39698.
2017-09-19 12:50:39 +02:00
Mike Blumenkrantz 3c31e67b05 use menu item geometry to determine whether menu item is onscreen
fix T2126
2017-08-18 15:52:50 -04:00
Mike Blumenkrantz f64812122f lock menu eventing during menu idler positioning
ensure moving menus doesn't trigger menu item activation
2017-08-18 15:52:50 -04:00
Mike Blumenkrantz bda9bfb8c0 avoid hiding->showing->hiding->etc submenus for active menu items 2017-08-18 15:52:50 -04:00
Mike Blumenkrantz abc70abbf0 make menu autoplacement more consistent by preferring DOWN placement 2017-08-18 15:52:50 -04:00
Mike Blumenkrantz 1a622a68ed make mouse-activated menus function as expected with 0 passed as activate time 2017-08-04 16:05:16 -04:00
Mike Blumenkrantz 01b7cf8227 add function to return a currently-active menu 2017-08-04 16:05:16 -04:00
Mike Blumenkrantz 41476f8f3e defer menu activation mouse-up feed
ensure that this is not triggered from an evas post event callback

ref T3144
2017-03-03 10:49:33 -05:00
Mike Blumenkrantz 0ce43bd0dd add E_Menu access from its comp object 2017-02-24 14:15:38 -05:00
Mike Blumenkrantz a117c977dd e_menu_grab_window_get() -> e_menu_is_active()
0 is a valid canvas window id, and this function was no longer being used
for its original purpose
2017-02-24 14:15:38 -05:00
Mike Blumenkrantz 502662456f Revert "handle recursion more effectively in e_menu_hide_all()"
This reverts commit 5764bf680e.

this was a workaround for a behavior change in efl
2016-04-27 11:27:56 -04:00
Mike Blumenkrantz 5764bf680e handle recursion more effectively in e_menu_hide_all()
there were recent changes to evas object deletion mechanics which caused
this to begin crashing due to recent changes to evas object deletion mechanics
2016-04-26 10:43:07 -04:00
Mike Blumenkrantz 194b1ab336 disable binding activation when grab dialog, menus, or dnd is active
these are all cases where bindings should fail to activate in order to
avoid interfering with current operations

also fixes an issue where attempting to add or modify an existing
mouse/key/wheel binding would fail as a result of that binding activating
while the grab dialog was active
2016-01-22 12:58:16 -05:00
Mike Blumenkrantz 4b2e75176b improve menu hiding and autoclose
remove menu object from autoclose (if set) and ensure that only the
intended menu is deactivated in the autoclose callback

this fixes some cases where the wrong menu could be closed (or not closed)
due to race conditions with ecore and evas events
2016-01-14 15:13:57 -05:00
Chris Michael 7b79e03937 Fix e_menu trying to swallow an object from a different canvas
_e_menu_realize was trying to swallow the menu->container_object into
the menu->bg_object, but the menu->bg_object was being created on the
compositor canvas, and the container object was being created on the
e_comp->elm_win.

With recent EFL changes, this causes an abort inside Evas.

To fix this, set the menu->evas to be the Evas from the e_comp->elm_win.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-21 10:26:18 -04:00
Mike Blumenkrantz 2cdb5a3b3f feed mouse-up event during mouse down on menus
this fixes the case where the mouse is moved while the mouse is pressed
so that the selected menu item will continue to follow the mouse

fix T2127
2015-08-19 15:03:50 -04:00
Mike Blumenkrantz f2f4b65ead move menu mouse-up feed util function to E_API in comp canvas 2015-08-05 17:26:50 -04:00
Yomi 0dc33a5aeb Fix misspellings in E's files.
Summary: Fix misspellings and spaces in E's files.

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2676
2015-06-16 16:10:21 -04:00
Carsten Haitzler 6289eba6a4 e menu - an extra object ref causes menus to never be freed
this has been in e for ages - someone not noticed, but this fixes
visual artifacts of left over menus on the top-left. this extra ref
really makes no sense. it's not like this ref is then accomoanied by a
matching unref somewhere else (after much debugging).

@fix
2015-06-10 21:32:01 +09:00
MinJeong Kim 20871a1e8f e_menu: remove an unnecessary comparison
Summary:
Remove an unnecessary comparison.
It fixes coverity CID 1291841 Same on both sides.
@fix

Reviewers: raster, devilhorns, zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2523
2015-05-18 08:36:09 -04:00
Chris Michael 0a94e8ba71 enlightenment: Make E build again with EFL from git
sed -i 's/EAPI/E_API/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 15:13:10 -04:00
Mike Blumenkrantz 12d6cf8f3b fix submenu visibility during scroll
sometimes while quickly moving the cursor through menu items with submenus
the visibility flag would toggle more quickly than the menu object's visibility.
this is no longer the case
2015-04-20 18:08:07 -04:00
Mike Blumenkrantz 471dcb24cb __UNUSED__ -> EINA_UNUSED
this has been bugging me forever. __UNUSED__ is no longer a valid macro here.
2015-03-18 18:09:09 -04:00
Mike Blumenkrantz ba7c1ac49c remove E_Zone->comp member 2015-03-13 17:44:24 -04:00
Mike Blumenkrantz 1736d1ecb9 e_client functions no longer require E_Comp param 2015-03-13 16:53:19 -04:00
Mike Blumenkrantz 1fe1c94245 comp canvas functions no longer require an E_Comp param 2015-03-13 16:07:08 -04:00
Carsten Haitzler 6097f06b26 e - menus - fix submenu popup direction when zones are not at 0 y 2015-02-25 15:55:08 +09:00
Carsten Haitzler 03c53655ce e - menus - fix autoscroll on zones not at 0 y... 2015-02-25 15:31:00 +09:00
Mike Blumenkrantz f691a8fa18 fix elm box parenting 2015-01-20 19:20:04 -05:00
Mike Blumenkrantz c8d58b30f3 de-e_comp_get()ify e_menu 2015-01-14 20:48:29 -05:00
Duna Oh 576ec9bdc4 fix crash when activating menu that is not in range
Summary: add the condition check code if the pressed key is not in range of menu items

Test Plan:
(1) Left-click on the desktop to bring up the menu.
(2) Press down the number key to activate the menu item.
(3) When you press down the number key that is not in range, you will see the segmentation error.

below is the crash log which I encoutered.
-------------------------------------------------------------------
Program received signal SIGSEGV, Segmentation fault.
_e_menu_item_activate_nth (n=n@entry=5) at src/bin/e_menu.c:2318
2318       _e_menu_item_ensure_onscreen(mi);

Reviewers: zmike, gwanglim, raster

Reviewed By: raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1845
2015-01-09 14:51:40 +09:00
Mike Blumenkrantz a11e8d5f2e e_box -> elm_box conversion
the next installment in the exciting adventure game Elementary Wars!

happy new year from #teamborker
2015-01-01 17:45:34 -05:00
Mike Blumenkrantz fd6f686467 move isedje() e_util and simplify/inline 2014-07-03 10:45:59 -04:00
Carsten Haitzler 7cce5642d6 e menus - check if its an edje obj without having complaints or using eo 2014-07-01 16:26:45 +09:00