https://bugs.documentfoundation.org/show_bug.cgi?id=49853

--- Comment #146 from Paul Oranje <[email protected]> ---
(In reply to V Stuart Foote from comment #145)
> (In reply to Maxim Monastirsky from comment #142)
> > Well, the root cause seems
> ...
> > Now we only need to figure out what's the right way to fix this...
> 
> check out Matthew F's similar work for bug 62054
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=0350bcde37edb1f25cca68cb1447ba8f759aea15
> 
> and refs to
> http://stackoverflow.com/questions/970707/cocoa-keyboard-shortcuts-in-dialog-
> without-an-edit-menu

sendEvent() is kind of de-multiplexer. pKeyWin is assigned the keyWindow
property value (window that currently receives keyboard events).
The search bar is a SalFrameWindow; true?

If so, then the fix would be to add handling of the Cmd-A|C|V|X|z|Z events for
this window - currently no special handling for these cases exists. That these
events end up being handled by the document window is obviously the wrong
handler is dispatched.

Where would these dispatch statements be inserted in the code ?
Already the needed dispatch statement can be found in sendEvent() and just
changing but the conditions for these statements to be executed may be all
that's required. Currently the condition is that the window is not a
SalFrameWindow, it should probably be "if (! bHandled)" and the test for
pKeyWin 

The current code does things like "if (cond) { ... return;} else if {...}".
When the if true clause always causes a return, then "else" should be omitted
IMHO. Applied to the code of sendEvent() the control flow will be easier to
grasp.

Question: can sendEvent() recurse ? (possibly via pushback of event)
That would allow for kind of FSM style of code (though I would not dare to open
a Pandorra's box).

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to