Opened 10 months ago

Closed 10 months ago

Last modified 9 months ago

#356 closed bug (fixed)

Listview eats IDCMP_RAWKEY DEL down when an item is selected

Reported by: Andreas Falkenhahn Owned by: Thore Böckelmann
Priority: normal Milestone: 5.0-2017R3
Component: muimaster.library Version: 5.0-2017R2
Severity: minor Keywords:
Cc: OS Platform: All
Blocked By: Blocking:
Release Notes:

Description

Run the code, select an item, and press DEL. The program will just report the keyup event for the DEL key (i.e. 0xc6). When no item is selected, the program will report the keydown and keyup events (i.e. 0x46 and 0xc6).

On MorphOS and MUI 3.8, however, the program will report keydown and keyup events also when an item is selected so I think that the current behaviour is a bug / compatibility break and should be fixed to be consistent with MUI 3.8 and MorphOS MUI.

Attachments (1)

main.c (6.6 KB) - added by Andreas Falkenhahn 10 months ago.

Download all attachments as: .zip

Change History (9)

Changed 10 months ago by Andreas Falkenhahn

Attachment: main.c added

comment:1 Changed 10 months ago by Thore Böckelmann

Owner: set to Thore Böckelmann
Status: newassigned

I'll have to do some deeper investigation to find out what is really going on here. But at least I can give you the advise to better use MUIM_HandleEvent instead of MUI_RequestIDCMP() plus MUIM_HandleInput.

MUIM_HandleEvent is bound to one specific object and hence causes less overhead than MUIM_HandleInput. The passed parameters (except the additional MUI_EventHandlerNode pointer) are the same as for MUIM_HandleInput, thus it is very easy to switch from one method to the other. And MUIM_HandleEvent also works with MUI3.8 already. MUI_RequestIDCMP() is declared obsolete anyway since ages.

comment:2 Changed 10 months ago by Thore Böckelmann

In 6036:

  • Numeric.c, Prop.c, Scrollbar.c: don't "eat" input events which are not handled explicitly. This refs #356.

comment:3 Changed 10 months ago by Thore Böckelmann

In 6038:

  • Balance.c, Radio.c, Selectgroup.c: don't "eat" input events which are not handled explicitly. This refs #356.

comment:4 Changed 10 months ago by Thore Böckelmann

Please check again with the next nightly build. There have been several classes which simply "ate" all input events, no matter whether they really handled them or not. This definitely caused certain input events to vanish under certain conditions.

comment:5 Changed 10 months ago by Thore Böckelmann

Milestone: future release5.0-2017R3
Priority: undecidednormal

According to my own test all non-eaten input events are now correctly passed to any further interested object.

The key sequence "del" is converted to MUIKEY_DELETE by default. Especially classes like Scrollbar.mui were eating all MUI key input events although they really handled just a few of them. This "eating" depended on certain conditions, like the mouse hovering a scrollbar or a list with an active item. Now everything should be fine again.

But if you want to be sure to receive all input events you should really switch to MUIM_HandleEvent and add an MUI_EventHandlerNode with high priority which simply parses all the things it is interested in but always returns zero instead of MUI_EventHandlerRC_Eat.

comment:6 Changed 10 months ago by Andreas Falkenhahn

Yes, works now. Thanks for the fix!

comment:7 Changed 10 months ago by Thore Böckelmann

Resolution: fixed
Status: assignedclosed

comment:8 Changed 9 months ago by Thore Böckelmann

In 6075:

Merged revision(s) 6024-6074 from trunk/mui5x:

  • muiprog.h, mastergfx.c: don't restrict any bitmap width calculations to 16 bits but use full 32 bits.

……..

  • mastergfx.c: don't inherit any dithering information when cloning a render info structure.

……..

  • ChangeLog: fixed date.

……..

  • Dirlist.c: cleaned up the skipthumbnailing() function a bit.

……..

  • contrib: updated all contributed classes to their latest revisions.

……..

  • mcc/Listtree.c: fixed a debug output to reflect the correct method.

……..

  • Listview.c, Popmenu.c, Pubscreenlist.c, Pubscreenpanel.c, Settingsgroup.c, Slider.c, muiasl.c: use the typical MUIC_xxx constants as class names instead of individual strings.

……..

  • List.c: "eat" the mouse wheel events if and only if they are finally applied to any of the scrollbars.

……..

  • List.c, Virtgroup.c: moved the IS_WHEEL_xxx() macros to a central place.

……..

  • Scrollbar.c: use the now global IS_WHEEL_xxx() macros.

……..

  • List.c: "eat" the mouse wheel events if and only if they are finally applied to any of the scrollbars.

……..

  • contrib: updated contributed NList classes to their latest versions.

……..

  • Numeric.c, Prop.c, Scrollbar.c: don't "eat" input events which are not handled explicitly. This refs #356.

……..

  • Cycle.c: use the common IS_WHEEL_xxx() macros.

……..

  • Balance.c, Radio.c, Selectgroup.c: don't "eat" input events which are not handled explicitly. This refs #356.

……..

  • Listview: don't "eat" input events which are not handled explicitly.

……..

  • Menudisplay.c: don't "eat" input events which are not handled explicitly.

……..

  • 5.0-2017R3 Release.

……..

  • Fontpanel.c: fixed inconsistent parameter type.

……..

  • demos/Slidorama.c: corrected method name in comment.

……..

  • Area.c, Window.c, mastermisc.c: rewrote the deprecated functions MUI_RequestIDCMP() and MUI_RejectIDCMP() to use a private MUI_EventHandlerNode internally. This makes it possible to get rid of the inefficient way to call the MUIM_HandleInput method. However, that method will still be invoked for compatibility reasons, but without the overhead of being passed through the window's complete object tree for each and every IDCMP message.

……..

  • doc/Area/MUIM_HandleEvent: added a paragraph about not calling DoSuperMethod().

……..

  • Window.c: use a proper TagItem structure instead of simple LONG array.

……..

  • mcc/Clock.c: turned the class into a real group with layered transparent objects.

……..

  • doc/Slave: fixed some typos.

……..

  • Slave.c: use SIGBREAKF_CTRL_C as single internal signal only.

……..

  • Slave.c: added a missing closing brace.

……..

  • tools/mkrelease.sh: include the common header in the created mui.h header file.

……..

  • Slave.c: use proper arbitration when delegating methods.

……..

  • Slave.c: unified normal and final error handling of dispatched methods. The delegated method already carries the MUIM_Slave_Error method ID prepended to the original method to be ready to be called instead of the original method during OM_DISPOSE:

……..

  • Slave.c: kill the subtask before rejecting the unhandled methods.

……..

  • Process.c: reformatted for consistency.

……..

  • include/xml/muimaster.xml: declared some functions as deprecated.

……..

  • mkrelease.sh: don't generate mui.h from scratch for the public SDK, but use the already generated mui_public.h instead.

……..

  • include/interfaces/muimaster.h: declared some functions as deprecated.

……..

  • dist_common/SDK/MUIdev.guide: reworked the input handling paragraph to no longer reference the deprecated MUIM_HandleInput method.

……..

  • demos/Class3.c: adapted the MUIM_HandleEvent method according to MUIdev.guide. The method must not be passed to the superclass.

……..

  • dist_common/SDK/MUIdev.guide, demos/Class3.c: eat the pressed mouse button within the object's domain.

……..

  • classes.mib: added a definition of MUIV_PointerType_Rotation (same as MUIV_PointerType_Rotate) for compatibility with old demo applications.

……..

  • classes.mib: added some comments.

……..

  • libos4.a: moved AllocVecPooled() and FreeVecPooled() into libos4.

……..

  • tools/makeinc.c: fixed wrong Trac line break in C headers.

……..

  • HashTable.c: fixed bogus indentation.

……..

  • doc/Window/MUIA_Window_Height: fixed some wording for consistency.

……..

  • doc: fixed lots of inconsistent spellings.

……..

  • libos4.a: moved VASPrintf() replacement function to libos4.

……..

  • VASPrintf.c: removed some unused state variables.

……..

  • Menu.c: added support for certain new methods of Family class.

……..

  • Menuitem.c: added support for certain new methods of Family class.

……..

  • Menustrip.c: added support for certain new methods of Family class.

……..

Note: See TracTickets for help on using tickets.