Thanks a lot Jiri for your clear explanation.

On Sat, Jun 29, 2024, 1:46 PM Jiri Svoboda <[email protected]> wrote:

> Hi Mohammed,
>
> a mouse press event should not be delivered to the UI control at all in
> the described case. Btw. I've found a good test case is to run UI Demo,
> open the 'File' menu and click on the right side of the disabled entry,
> which is just above the 'Cancel' button.
>
> What we have here is a popup window that is over the focused window. The
> press event gets delivered both to the popup window and to the focused
> window below. That is wrong.
>
> The responsible function is ds_seat_post_pos_event() in the display
> server. I have rewritten the function so now it hopefully works better. The
> problem described above is fixed now. Mouse move and release events are
> still delivered to the focused window, so dragging (e.g. scrollbar, window
> resize) still work properly.
>
> There is a generic solution not requiring to modify each control.
>
> > So, I'm asking, is it OK to change the creation function of these
> widgets in a way that it receives the window's state?
> > The widgets that will be affected are: tabset, radiobutton, pushbutton,
> checkbox and slider.
> There is a reason why these controls don't take a window as a parameter
> (at the beginning of the UI library no controls did). When you create a
> window, you also create its title bar. The title bar contains buttons. So
> you need to create these buttons while the window still isn't fully
> constructed. If a button required a window as a parameter, how do you
> create it if you still didn't finish creating the window? Sure you could
> pass it a partially-constructed window, but that's not very nice, you would
> need to be very careful not to do something with the window that still
> cannot be done at that point ... bleagh.
>
> Cheers,
> Jiri
>
> ---------- Původní e-mail ----------
> Od: Mohammed Q. Hussian <[email protected]>
> Komu: HelenOS development mailing list <[email protected]>
> Datum: 27. 6. 2024 18:38:17
> Předmět: [HelenOS-devel] Passing window's state to the other UI widgets
>
> Hello All,
>
> When a window has a menubar and one of the menu entries is clicked by the
> user, the widget which resides under this entry will also be clicked also.
> I've fixed this for some widgets (list, scrollbar and entry), the changes
> can be found here (
> https://github.com/MaaSTaaR/helenos/tree/ui-ddmenu-overlap).
>
> The fix is too simple, it depends on the window's state which should be
> passed to the widget that we would like to prevent it from handling the
> position event when the menubar is active. The problem with some widgets
> (e.g. tabset) is that the window's state will not be passed to it when the
> creation function is called. So, I'm asking, is it OK to change the
> creation function of these widgets in a way that it receives the window's
> state? The widgets that will be affected are: tabset, radiobutton,
> pushbutton, checkbox and slider.
>
> Regards,
> MQH
> _______________________________________________
> HelenOS-devel mailing list
> [email protected]
> http://lists.modry.cz/listinfo/helenos-devel
>
> _______________________________________________
> HelenOS-devel mailing list
> [email protected]
> http://lists.modry.cz/listinfo/helenos-devel
>
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to