Permalink
Browse files

issue #1044

Closes #1044
Closes #1045
1 parent 309a4d6 commit 2b33e45c085be11e6833618cd142210e49625260 @frostidaho frostidaho committed with flacjacket Apr 20, 2017
Showing with 5 additions and 2 deletions.
  1. +5 −2 libqtile/dgroups.py
View
@@ -230,8 +230,11 @@ def _add(self, client):
self.sort_groups()
def sort_groups(self):
- self.qtile.groups.sort(key=lambda g: self.groupMap[g.name].position)
- libqtile.hook.fire("setgroup")
+ grps = self.qtile.groups
+ sorted_grps = sorted(grps, key=lambda g: self.groupMap[g.name].position)
+ if grps != sorted_grps:
+ self.qtile.groups = sorted_grps
+ libqtile.hook.fire("changegroup")
def _del(self, client):
group = client.group

0 comments on commit 2b33e45

Please sign in to comment.