darcs patch: add sendMessageWithNoRefresh and have broadcastMessage...
Hi, this is a follow up of the discussion we had here: http://www.haskell.org/pipermail/xmonad/2008-February/004827.html and yesterday on the #xmonad channel. The description and the code seem quite clear but I'm here to give more details. After all this patch does nothing else but removing a bug in broadcastMessage: we cannot call handleMessage *within* runOnWorkspaces because this way we update the workspace record even when handleMessage return Nothing. "We upgrade" actually means "we downgrade" the workspace record, because we are actually removing all changes to the workspace done within handleMessage. As you see I didn't change the semantics of broadcastMessage: it is - and, after all our discussions, I think it must remain - a way of updating the layout record of a workspace without refreshing the screen, and *only* when handleMessage returns a Just ml. So now we have: 1. sendMessage to send a message to the current workspace and refresh the screen if handleMessage returns Just ml; 2. broadcastMessage: to send a message to every workspace and update the layout field of the workspace when handleMessage returns Just ml. Cheers, Andrea Sat Feb 23 14:07:02 CET 2008 Andrea Rossato <andrea.rossato@unibz.it> * add sendMessageWithNoRefresh and have broadcastMessage use it This patch: - moves broadcastMessage and restart from Core to Operations (to avoid circular imports); - in Operations introduces sendMessageWithNoRefresh and move updateLayout outside windows. - broadcastMessage now uses sendMessageWithNoRefresh to obey to this rules: 1. if handleMessage returns Nothing no action is taken; 2. if handleMessage returns a Just ml *only* the layout field of the workspace record will be updated.
participants (1)
-
Andrea Rossato