These are chat archives for AvaloniaUI/Avalonia

15th
Aug 2018
WojciechKrysiak
@WojciechKrysiak
Aug 15 2018 06:47
Gtk question: I encountered an issue with dialog windows - as per gtk design, all subsequent UI events get directed to the modal window. This means that any subsequent windows lack any interactivity. Do you think adding a static EventManager to dispatch those events to appropriate windows is a good idea?
danwalmsley
@danwalmsley
Aug 15 2018 07:23
@WojciechKrysiak is this when you open a dialog as modal instead of non modal
I
Calling show as apposed to showdialog?
WojciechKrysiak
@WojciechKrysiak
Aug 15 2018 07:26
it's caused by Native.GtkWindowSetModal(GtkWidget, true); in ShowDialog
Easiest way to verify is to create a dialog window with a ContextMenu
ContextMenu shows fine, but no events reach it - instead the events are hittested and routed through the modal window control tree
but the good thing is that you receive the target GdkWindow as the first parameter of the event, so you can manually forward the event to the appropriate window
And as this also affects TopLevel windows shown after the dialog (not even rendering), I think the only solution is to manually route the events to mimic WPF/W32 window logic
WojciechKrysiak
@WojciechKrysiak
Aug 15 2018 07:33
or I might be wrong about the GdkWindow as the first argument, this might even be the GtkWidget - I used gdk_event_get_window
yeah, reading the docs it is GtkWidget
danwalmsley
@danwalmsley
Aug 15 2018 08:28
ah I see what your saying
WojciechKrysiak
@WojciechKrysiak
Aug 15 2018 08:36
A question to @kekekeks - what is the reason that, during DoDispose() the Closed handler is called before the signals are disconnected?
WojciechKrysiak
@WojciechKrysiak
Aug 15 2018 18:57
Ok, I've created an EventManager proposal PR. Please take a look and let me know if it's a direction you'd like this to go.
danwalmsley
@danwalmsley
Aug 15 2018 19:16
@grokys just been giving the keyboard navigation branch a look
context menu I see work fine, but menu items I dont see it highlight the selected item
might just be a style in my code though
hmm cant find any
wierd
Steven Kirk
@grokys
Aug 15 2018 20:57
oh, that's strange. does it work properly on the controlcatalog?