
On Wed, Aug 29, 2007 at 10:27:48AM -0400, David Roundy wrote:
Your doLay is buggy: when dl returns a modified layout, your mouseFocus "falls off". Similarly with ml. I would use LayoutHelpers:
mouseFocus = layoutModifer idModDo modLay where modLay sm | Just e <- fromMessage sm = handle_event e >> return Nothing handle_event e@(CrossingEvent {ev_window = w, ev_event_type = t}) | t == enterNotify && ev_mode e == notifyNormal && ev_detail e /= notifyInferior = focus w -- what should I do to XState after this? handle_event _ = return ()
This was my first attempt, actually, but it doesn't work as expected. For instance, if I use it with DragPane, doClick (mouse dragging) stops working. Moreover if I use mod-l or mod-h to resize the panes, and after that I change the focus with the mouse - which works as expected, as in the previous code -, the decorations will not be destroyed anymore if I resize once again. The same with Tabbed. In other words, Decoration stops working correctly. The problem is that this code produces the very same issue as the one I submitted before. I would like to understand where I'm doing something wrong. Thanks for your kind attention. Andrea