adding an existing workspace with DynamicWorkspaces?

Hi all, Today, while helping crhalpin in #xmonad, I discovered that if you call X.A.DynamicWorkspaces.addWorkspace with the name of an already-existing workspace, it simply makes another one, which seems... odd. Does anyone actually rely on this behavior? Or is it OK if I fix it so that calling addWorkspace with the name of a workspace that already exists is a no-op? -Brent

On Thu, Nov 12, 2009 at 11:40:35AM -0500, Brent Yorgey wrote:
Does anyone actually rely on this behavior? Or is it OK if I fix it so that calling addWorkspace with the name of a workspace that already exists is a no-op?
Even if someone did rely on this, I would still consider it broken behavior, since StackSet seems to make the implicit assumption that there is at most 1 workspace with a given name. (E.g. lookupWorkspaces returns a `Maybe i' instead of a list) So I think that consistently we either have to change those things in StackSet or fix DynamicWorkspaces in the way you suggested, even if it breaks one or two configs. For what it's worth, I think the latter would be somewhat more sane.

On Thu, Nov 12, 2009 at 11:40:35AM -0500, Brent Yorgey wrote:
Hi all,
Today, while helping crhalpin in #xmonad, I discovered that if you call X.A.DynamicWorkspaces.addWorkspace with the name of an already-existing workspace, it simply makes another one, which seems... odd. Does anyone actually rely on this behavior? Or is it OK if I fix it so that calling addWorkspace with the name of a workspace that already exists is a no-op?
-Brent
Definitely a bug, go ahead and fix it. Cheers, Spencer Janssen

On Thu, Nov 12, 2009 at 12:39:57PM -0600, Spencer Janssen wrote:
On Thu, Nov 12, 2009 at 11:40:35AM -0500, Brent Yorgey wrote:
Hi all,
Today, while helping crhalpin in #xmonad, I discovered that if you call X.A.DynamicWorkspaces.addWorkspace with the name of an already-existing workspace, it simply makes another one, which seems... odd. Does anyone actually rely on this behavior? Or is it OK if I fix it so that calling addWorkspace with the name of a workspace that already exists is a no-op?
-Brent
Definitely a bug, go ahead and fix it.
Fixed, and pushed. -Brent
participants (3)
-
Brent Yorgey
-
Daniel Schoepe
-
Spencer Janssen