After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 155556 - gok ui grab keys can branch-to/invoke actions but shouldn't ignore children of actionables.
gok ui grab keys can branch-to/invoke actions but shouldn't ignore children o...
Status: RESOLVED FIXED
Product: gok
Classification: Deprecated
Component: general
unspecified
Other All
: High major
: ---
Assigned To: David Bolter
David Bolter
AP1
Depends on:
Blocks:
 
 
Reported: 2004-10-16 03:38 UTC by Harry Lu
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.82 KB, patch)
2004-11-01 17:09 UTC, David Bolter
none Details | Review
proposed patch v2 (2.26 KB, patch)
2004-11-02 14:01 UTC, David Bolter
accepted-commit_now Details | Review
proposed patch v3 (2.75 KB, patch)
2004-11-04 15:52 UTC, David Bolter
committed Details | Review

Description Harry Lu 2004-10-16 03:38:09 UTC
If UI grab a component which has an action interface, it just list all its
actions. Its children won't be shown.  In the past, it will list all the
children instead of the actions.
Comment 1 David Bolter 2004-10-18 18:43:27 UTC
This bug is significant.  I will investigate.
Comment 2 bill.haneman 2004-10-20 19:24:35 UTC
The report isn't quite accurate, I think.

In the past, GOK preferentially invoked a child's action instead of a parent's
action, if the object in the UI Grab had an actionable child.  That logic is
still present, but if the parent has more than one action available, the above
shortcut can't be taken; instead GOK must list the child actions among the
parent actions (if actionable_child_count >= 1).  Seems that perhaps the
creation of the 'Actions' keyboard is failing to include the actionable
children's actions.
Comment 3 David Bolter 2004-10-20 20:36:45 UTC
What is a good test case for this?
Comment 4 Harry Lu 2004-10-21 09:16:17 UTC
Another finding today: Even all the parent actions are listed there, clicking
any of them actually always invokes the first action.
Comment 5 David Bolter 2004-10-21 14:23:58 UTC
Harry thanks for the reporting.  I need more detail to get any useful
understanding.  Can you provide steps to recreate the behaviours you mention, as
well as descriptions of the behavour?
Comment 6 Calum Benson 2004-10-21 16:49:08 UTC
Apologies for spam-- ensuring Sun a11y team are cc'ed on all current a11y bugs.
 Filter on "SUN A11Y SPAM" to ignore.
Comment 7 Harry Lu 2004-10-22 02:45:41 UTC
comments from Bill:
Harry:

I believe you may be mistaken about GOK presenting all the children of
an Action-implementing container.  To the best of my knowledge GOK never
did this for the general case.  

There was a bug which caused GOK to ignore the Action interface in some
situations.  At the same time GOK had some simplified logic which caused
it to invoke a child action on an actionable component in preference to
the parent's action, if one was present - but this simplified logic only
worked for the '0'th or default action.

That behavior was responsible for other bugs/problems, so it had to
change, and in order to support multiple actions (an urgent request of
the Evolution and Mozilla teams), the other simplified action logic also
had to be changed.

I agree that GOK should present child actions to the end-user, but this
requires new code to be written, it isn't a logic error in the new
checkins.

- Bill
Comment 8 Harry Lu 2004-10-22 03:44:16 UTC
In JDS' evolution, we have a customed component which has a action interface and
some actionable children.
In old GOK (before Oct. I think), UI grab can see this component. When grabbing
it, GOK just lists all the actionable children.
In current GOK, when grabbing it, GOK just lists all its action. Its children
won't be shown.
If I remove the action interface, GOK's UI grab won't list this component in the
GUI. GOK lists its children directly.

If GOK can list both the component's action and all its actionable children,
that would be more useful.

Another problem is though GOK lists all its action, clicking any of them just
invokes the component's first action (the default action?). For example, you can
UI grab a gtk button. In the past, GOK invokes the default action
("click")directly. Currently, GOK will list the button's 3 actions, "click",
"press" and "release". But clicking any of the actions will invoke "click" action.
Comment 9 bill.haneman 2004-10-22 13:09:48 UTC
Harry: I am filing the 'all actions are default action' bug as a separate issue.
Comment 10 David Bolter 2004-10-26 15:29:56 UTC
(11:21:30) davidb: i'm not active on it.  i think it is valid.  we probably need
to prefix actions with the name of the component, or add some heirarchy.
(11:21:39) davidb: and expose the children
(11:22:17) billh#sun: just adding the child actions should be OK in most cases
            11:22
(11:22:47) davidb: by "child actions" are we talking really talking about "child
components"?
(11:23:28) davidb: so we would have a keyboard with actions (of the parent) and
names (of the chidlren)
(11:23:42) billh#sun: potentially quite messy
(11:24:07) davidb: yes.  so perhaps on the actions keyboard, a key to branch to
actionable children?
(11:24:17) billh#sun: probably the issue was being masked by an old GOK bug that
was causing the container's actions to be missed
(11:24:23) billh#sun: hmm
(11:24:29) billh#sun: sounds not-so-good
(11:24:36) billh#sun: (branch to actionable children)
(11:24:40) davidb: too much indrection.
(11:24:46) billh#sun: yes
(11:24:54) davidb: so prefix the actions with the parent name?
(11:25:02) billh#sun: I would think parent actions and actionable-child-keys
(11:25:19) billh#sun: i.e. looks like the UI Grab keyboard, but starting at a
different root
(11:25:29) davidb: sure.
(11:25:44) davidb: but we've never had a keyboard with actions and components
(names)
(11:25:52) billh#sun: yes, perhaps prefixing with the parent name, but only if
there are actionable children
(11:25:57) davidb: right
(11:26:02) billh#sun: (otherwise, needless verbosity and reduced readability IMO)
(11:26:16) davidb: yes.
(11:26:18) billh#sun: I think we have, more or less
(11:26:54) billh#sun: we've had UI Grab which includes actionable things _and_
not-really-an-action things (like text fields, the back button, scrollbar
buttons, etc.)
            11:27
(11:28:00) billh#sun: OK, well perhaps this one will have to wait a couple more
days.
(11:28:07) davidb: i think so.
Comment 11 David Bolter 2004-11-01 17:09:09 UTC
Created attachment 33315 [details] [review]
proposed patch

I can't test this as I don't have a test case.
Comment 12 mengjie yu 2004-11-02 09:04:35 UTC
Hi

I have patched it. But GOK crashed when I use it to grab the calender and  then
the day view.
I commented out the SIGSEGV handler and used GDB to get the trace as follows:

---------------------------------------------------------------------------------
Program received signal SIGSEGV, Segmentation fault.

Thread 1024 (LWP 21950)

  • #0 g_object_unref
    from /usr/lib/libgobject-2.0.so.0
  • #1 AccessibleStateSet_unref
    from /usr/lib/libcspi.so.0
  • #2 gok_keyboard_update_dynamic
    at gok-keyboard.c line 2713
  • #3 gok_main_ds
    at main.c line 1547
  • #4 gok_main_display_scan
    at main.c line 1511
  • #5 gok_keyboard_branch_gui
    at gok-keyboard.c line 2842
  • #6 gok_keyboard_branch_or_invoke_actions
    at gok-keyboard.c line 3085
  • #7 gok_keyboard_branch_gui_actions
    at gok-keyboard.c line 3146
  • #8 gok_keyboard_branch_byKey
    at gok-keyboard.c line 2324
  • #9 gok_keyboard_output_key
    at gok-keyboard.c line 4184
  • #10 gok_keyboard_output_selectedkey
    at gok-keyboard.c line 3991
  • #11 gok_scanner_perform_effects
  • #12 gok_scanner_left_button_down
    at gok-scanner.c line 2121
  • #13 gok_spy_mouse_listener
    at gok-spy.c line 2132
  • #14 cspi_device_event
    from /usr/lib/libcspi.so.0
  • #15 marshal_BOOLEAN__POINTER
    from /usr/lib/libspi.so.0
  • #16 g_type_class_meta_marshal
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #18 signal_emit_unlocked_R
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #21 impl_device_event
    from /usr/lib/libspi.so.0
  • #22 _ORBIT_skel_small_Accessibility_DeviceEventListener_notifyEvent
    from /usr/lib/libspi.so.0
  • #23 ORBit_POAObject_invoke
    from /usr/lib/libORBit-2.so.0
  • #24 ORBit_OAObject_invoke
    from /usr/lib/libORBit-2.so.0
  • #25 ORBit_small_invoke_adaptor
    from /usr/lib/libORBit-2.so.0
  • #26 ORBit_POAObject_handle_request
    from /usr/lib/libORBit-2.so.0
  • #27 ORBit_POAObject_invoke_incoming_request
    from /usr/lib/libORBit-2.so.0
  • #28 ORBit_POA_handle_request
    from /usr/lib/libORBit-2.so.0
  • #29 ORBit_handle_request
    from /usr/lib/libORBit-2.so.0
  • #30 giop_connection_handle_input
    from /usr/lib/libORBit-2.so.0
  • #31 link_connection_io_handler
    from /usr/lib/libORBit-2.so.0
  • #32 link_source_dispatch
    from /usr/lib/libORBit-2.so.0
  • #33 g_main_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #34 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #35 g_main_context_iterate
    from /usr/lib/libglib-2.0.so.0
  • #36 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #37 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #38 cspi_main
    from /usr/lib/libcspi.so.0
  • #39 SPI_event_main
    from /usr/lib/libcspi.so.0
  • #40 main
    at main.c line 454
  • #41 __libc_start_main
    from /lib/i686/libc.so.6

Comment 13 David Bolter 2004-11-02 13:58:04 UTC
The stack trace helps a lot thanks!  I can see that I am calling
AccessibleStateSet_unref 1 many times, but I am surprised that would cause a
SEG.  Perhaps that is not the cause.  I'll attach an improved patch.
Comment 14 David Bolter 2004-11-02 14:01:47 UTC
Created attachment 33348 [details] [review]
proposed patch v2

Meng-Jie, I hope this avoids the seg fault.
Comment 15 bill.haneman 2004-11-02 14:03:21 UTC
double unrefs mean double frees, and SEGVs often result.  
Comment 16 David Bolter 2004-11-02 15:41:50 UTC
Good to know.  Too bad there is no safeguard against that.
Comment 17 mengjie yu 2004-11-03 04:00:24 UTC
The patch works. GOK no longer crash.

However, there is another problem.

In general, as the GOK's working mechanism. when a button is pressed using GOK,
GOK will give out three action, Press, Click and Release. Let the user to choose 
the action they want.

Nevertheless, When I press some buttons of Evolution, GOK seems not give out
the three actions. Instead, GOK do the default action (often the click).  while
some 
cb function is not connected to the default signal (action),  therefore,  it can
not 
call the callback functions using GOK. 

I wonder why GOK don't give out three actions to any button ??




Comment 18 David Bolter 2004-11-03 15:12:04 UTC
Meng-Jie, the (unwanted?) behaviour you describe might be the result of an
intentional "fix" (see bug 154604).  Do you see a situation where the three
actions: click, press, release need to be shown?  

Also, does the latest patch fix the initial problem?  (I guess I should ask Harry?)
Comment 19 Harry Lu 2004-11-04 03:25:01 UTC
David, yes, the patch fix the initial problem from our testing. Thanks.

For bug 154604, I have some concerns here. As I can see from some codes, not
everyone connect to the "clicked" signal of a gtkbutton. Some just connect to
the "pressed" signal, and in some cases, they connect to "button_press_event"
signal.  So their signal handling function won't be called when you just let the
button emit a "clicked" signal. 
In gailbutton.c, the action "press" will simulate a button press event. So their
function can be called when doing the action "press".

So I think leave the 3 actions there, user can try "click" first, if this
doesn't work, he might then try "press".
Comment 20 David Bolter 2004-11-04 14:01:26 UTC
Harry I'll respond over in bug 154604.  Thanks for testing the patch.

Bill can you give it a once over before I commit?
Comment 21 bill.haneman 2004-11-04 14:45:59 UTC
I think exposing only "click" is OK if click is the first of 3 actions.  For the
cases we know about, "press" is the first action for things that connect to the
button-press/release signals.

The alternative, always showing all 3 actions, causes a problem because it
requires a whole new choice from the GOK user, and for switch users this can
represent a serious efficiency loss.
Comment 22 David Bolter 2004-11-04 15:29:23 UTC
NOTE: bug 157358 has been created for this discussion tangent.
Comment 23 bill.haneman 2004-11-04 15:50:55 UTC
Comment on attachment 33348 [details] [review]
proposed patch v2

commit with small change - please remove the "if (did_actionkeys) block" as it
does nothing (as we discussed on IRC)
Comment 24 David Bolter 2004-11-04 15:52:44 UTC
Created attachment 33428 [details] [review]
proposed patch v3
Comment 25 David Bolter 2004-11-04 15:56:19 UTC
Comment on attachment 33428 [details] [review]
proposed patch v3

patch as committed.
Comment 26 David Bolter 2004-11-04 15:57:12 UTC
Fixed in CVS.  Thanks everyone!