Save maximized and fullscreen state. Argument handling needs improving; it'll break if short-form is used and squished together.
Probably we should piece together a command line directly from OptionParser's results, not copy it manually like this.
This commit is contained in:
parent
035b15b6d9
commit
d388885581
@ -250,6 +250,8 @@ class Terminator:
|
||||
dbg("Saving session for xsm")
|
||||
args = [sys.argv[0],
|
||||
("--geometry=%dx%d" % self.window.get_size()) + ("+%d+%d" % self.window.get_position())]
|
||||
|
||||
# OptionParser should really help us out here
|
||||
drop_next_arg = False
|
||||
geompatt = re.compile(r'^--geometry(=.+)?')
|
||||
for arg in sys.argv[1:]:
|
||||
@ -257,10 +259,16 @@ class Terminator:
|
||||
if mo:
|
||||
if not mo.group(1):
|
||||
drop_next_arg = True
|
||||
elif not drop_next_arg:
|
||||
elif not drop_next_arg and arg not in ('--maximise', '-m', '--fullscreen', '-f'):
|
||||
args.append(arg)
|
||||
drop_next_arg = False
|
||||
|
||||
if self._maximised:
|
||||
args.append('--maximise')
|
||||
|
||||
if self._fullscreen:
|
||||
args.append('--fullscreen')
|
||||
|
||||
# We can't set an interpreter because Gnome unconditionally spams it with
|
||||
# --sm-foo-bar arguments before our own argument list. *mutter*
|
||||
# So, hopefully your #! line is correct. If not, we could write out
|
||||
|
Loading…
Reference in New Issue
Block a user