Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
Closes #736
  • Loading branch information
Aniruddh Kanojia authored and flacjacket committed Aug 9, 2015
1 parent 124cf52 commit c4d383a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/manual/config/layouts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ the next and previous layouts.

Qtile uses python's inbuilt object serialization (pickle) for restarts.
For custom layouts it is required that if you have unpickelable objects
within your layout, then you have to add an exception for your layout
within your layout, then you have to add an exception for your layout
in state.py. You will have to manually restore those specific attributes in
state.py. Some examples of unpickelable objects within qtile are a delegate
layout, a window object, a group object etc. For window objects, the current
Expand Down
8 changes: 4 additions & 4 deletions libqtile/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def save_layout(self, layout, group, save=True):
layout._panel = None
layout._layout = None

def restore_window(self, qtile, saved_layout, layout):
def restore_window(self, qtile, saved_layout, layout): # Restore objects with references window objects

members = dir(saved_layout)
for member in members:
Expand All @@ -86,7 +86,7 @@ def restore_window(self, qtile, saved_layout, layout):
except AttributeError:
pass

def restore_layout(self, qtile, saved_layout, layout, group):
def restore_layout(self, qtile, saved_layout, layout, group): # Restore layout objects

saved_layout.group = group
self.restore_window(qtile, saved_layout, layout)
Expand All @@ -101,9 +101,9 @@ def restore_layout(self, qtile, saved_layout, layout, group):
layout.show(screen)
if isinstance(layout, libqtile.layout.stack.Stack):
for i in range(len(layout.stacks)):
self.restore_window(qtile, saved_layout.stacks[i], layout.stacks[i])
self.restore_window(qtile, saved_layout.stacks[i], layout.stacks[i]) # Objects with references to window objects
if isinstance(layout, libqtile.layout.slice.Slice):
self.restore_layout(qtile, saved_layout._slice, layout._slice, group)
self.restore_layout(qtile, saved_layout._slice, layout._slice, group) # layout with references to layout objects
self.restore_layout(qtile, saved_layout.fallback, layout.fallback, group)

def apply(self, qtile):
Expand Down
3 changes: 0 additions & 3 deletions test/test_serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ def __init__(self, layout):
self.layouts = [
layout
]
border_args = dict(
border_width=1,
)


passing_layouts = [
Expand Down

0 comments on commit c4d383a

Please sign in to comment.