[xmonad] darcs patch: add sendMessageWithNoRefresh and have
broadcastMessage...
Andrea Rossato
andrea.rossato at unibz.it
Sat Feb 23 08:19:01 EST 2008
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 at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 13097 bytes
Desc: A darcs patch for your repository!
Url : http://www.haskell.org/pipermail/xmonad/attachments/20080223/a1812eea/attachment.bin
More information about the xmonad
mailing list