Project

General

Profile

Bug #8917

Mouse focus management: focus update must happen on mouse down, not on mouse up

Added by Vladimir Tsichevski about 10 hours ago. Updated about 7 hours ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:

8917.p Magnifier (736 Bytes) Vladimir Tsichevski, 07/02/2024 01:39 PM

functions.i (2.54 KB) Vladimir Tsichevski, 07/02/2024 01:46 PM

printEntryLeave.i (134 Bytes) Vladimir Tsichevski, 07/02/2024 01:46 PM


Related issues

Related to User Interface - Bug #8673: Deduce the logic behind OE focus management and implement in FWD WIP

History

#1 Updated by Vladimir Tsichevski about 10 hours ago

When the user presses/releases a mouse button in a widget area, OE updates data related to focus.

Run the 8917.p example in OE and FWD.

Press and release a mouse button in the innerFrame area (the area with the focusable2 button).
The focus resolution will happen, and some ENTRY/LEAVE events will be sent, which will be reported by the corresponding triggers.

The issue: in OE this will happen on mouse down, while in FWD this will happen on mouse up.

Note: the example provided itself has nothing interesting.
Note1: in OE any mouse button (left/right/middle) causes focus adjusting, in FWD only the left mouse button does it.

#2 Updated by Vladimir Tsichevski about 10 hours ago

Hynek, Constantine, can you comment this, please?

#3 Updated by Hynek Cihlar about 9 hours ago

Vladimir Tsichevski wrote:

The issue: in OE this will happen on mouse down, while in FWD this will happen on mouse up.

Do both the focus change and the trigger happen on mouse up? What mouse down handler reports for FOCUS? Also what happens when you mouse down in the frame, move the mouse outside the window and mouse up?

#4 Updated by Greg Shah about 9 hours ago

What happens if you mouse down and then press the ESC key?

#5 Updated by Vladimir Tsichevski about 8 hours ago

Hynek Cihlar wrote:

Vladimir Tsichevski wrote:

The issue: in OE this will happen on mouse down, while in FWD this will happen on mouse up.

Do both the focus change and the trigger happen on mouse up?

All triggers are fired on mouse up in FWD. The final focus change must be done or must not be done depending on the results of ENTRY triggers.

What mouse down handler reports for FOCUS?

In the example, ENTRY and LEAVE triggers are attached to all widgets. No mouse down trigger is defined in this example.
The focus reported is the system FOCUS handle value.>

Also what happens when you mouse down in the frame, move the mouse outside the window and mouse up?

In FWD: same focus things as if you mouse up in the same frame.
In OE: nothing (same as if you mouse up in the same frame).

Also the event sequence and the resulting focus differ in FWD and OE, but all this is not related to this issue.

The question is why all the activity, whatever it is, happens on different mouse events?

This is managed by some complicated code in TC.processProgressEvent, wrote by you and Constantin. So I wonder why is this? May be, the thing can be configured in OE, and my configuration differs from the one you used when you wrote the code? Or, may be the behavior was changed in some OE versions? I tested this with OE 11.6.

#6 Updated by Vladimir Tsichevski about 8 hours ago

Greg Shah wrote:

What happens if you mouse down and then press the ESC key?

Procedure complete. Press space bar to continue. Both FWD an OE behave the same.

#7 Updated by Hynek Cihlar about 8 hours ago

Vladimir Tsichevski wrote:

The question is why all the activity, whatever it is, happens on different mouse events?

IMHO this was just implemented with an assumption that the focus should change on mouse down. I don't think this can be configured in OE. Even different versions of OE with different behavior sounds unlikely.

#8 Updated by Vladimir Tsichevski about 8 hours ago

Hynek Cihlar wrote:

Vladimir Tsichevski wrote:

The question is why all the activity, whatever it is, happens on different mouse events?

IMHO this was just implemented with an assumption that the focus should change on mouse down. I don't think this can be configured in OE. Even different versions of OE with different behavior sounds unlikely.

Does this mean this is just an error and must be fixed?

#9 Updated by Hynek Cihlar about 8 hours ago

Vladimir Tsichevski wrote:

Hynek Cihlar wrote:

Vladimir Tsichevski wrote:

The question is why all the activity, whatever it is, happens on different mouse events?

IMHO this was just implemented with an assumption that the focus should change on mouse down. I don't think this can be configured in OE. Even different versions of OE with different behavior sounds unlikely.

Does this mean this is just an error and must be fixed?

Yes.

#10 Updated by Constantin Asofiei about 7 hours ago

Vladimir, the problem I think originates from cases where the mouse is used inside a widget, and not a frame. See this revised test (uses FILL-IN to better see the focus switch):

If you click into the FILL-IN, it will not switch the system focus immediately if there is a mouse-down trigger - this will be done on mouse-up. Also, if there is no mouse-down trigger, then the system focus will be switched immediately, but the events again will be done on mouse-up.

I think what you found is a case specific to frames - in these cases, because (I think) there is no system focus on it, everything happens on mouse-down, not mouse-up.

#11 Updated by Vladimir Tsichevski about 7 hours ago

Constantin Asofiei wrote:

Vladimir, the problem I think originates from cases where the mouse is used inside a widget, and not a frame. See this revised test...

There is no need to create new tests and add triggers for mouse events, which makes things more complicated.

Even in the original example, if you press the mouse button on a button, the focus processing is deferred until mouse up.

So, the answer is probably: for some mouse targets focus should be updated on mouse down, for other targets - on mouse up.

#12 Updated by Vladimir Tsichevski about 7 hours ago

  • Related to Bug #8673: Deduce the logic behind OE focus management and implement in FWD added

Also available in: Atom PDF