diff --git a/dockbarx/dockbar.py b/dockbarx/dockbar.py index 2e760a6..4045f26 100644 --- a/dockbarx/dockbar.py +++ b/dockbarx/dockbar.py @@ -711,7 +711,8 @@ def set_orient(self, orient): if self.globals.settings["show_only_current_desktop"]: self.__on_desktop_changed() - #~ self.groups.manage_size_overflow() # Don't think line does anything useful here. Remove if everything looks OK. + else: + self.groups.manage_size_overflow() # If a floating window panel is shown, close it. lp = self.globals.get_locked_popup() @@ -754,6 +755,7 @@ def set_size(self, size): group.button.set_manual_size(True) # Update the button so that it get the new size. group.button.update_state(force_update=True) + self.groups.manage_size_overflow() def set_max_size(self, max_size): """Set the max size DockbarX is allowed to occupy.""" @@ -885,6 +887,7 @@ def __on_active_window_changed(self, screen, previous_active_window): active_group_name = self.windows[active_window] active_group = self.groups[active_group_name] active_group.set_active_window(active_window) + self.groups.manage_size_overflow() def __on_window_closed(self, screen, window): if window in self.windows: @@ -985,10 +988,6 @@ def __make_groupbutton(self, identifier=None, desktop_entry=None, # overflow manager knows if the button should be # shown or not. group.add_window(window) - if index is None or index == -1: - self.groups.append(group) - else: - self.groups.insert(index, group) self.__media_player_check(identifier, group) self.unity_watcher.apply_for_group(group) self.update_pinned_apps_list() @@ -999,6 +998,10 @@ def __make_groupbutton(self, identifier=None, desktop_entry=None, if self.size is not None and self.size > 10: # Update the surface group.button.update_state(force_update=True) + if index is None or index == -1: + self.groups.append(group) + else: + self.groups.insert(index, group) return group def __add_window(self, window):