Gajim window size not restored properly when using "Single Window for Everything"
Bug description
The gajim main (roster) window size is not restored properly when using "Single Window for Everything" for "Window behavior" and maximizing window.
Steps to reproduce
This is when using xfwm as window manager.
- In preferences, set "Window behavior" to "Single Window for Everything"
- Maximize gajim
- Quit gajim
- Start gajim
Expected behavior: Gajim should start maximized
Actual behavior: Gajim starts with the roster window only as large as the roster.
More information
Looking at the code, I think there are two independent issues here.
First of all, gajim does not properly remember the window width when using "Single Window for everything". The reason is this code in prepare_quit
in roster_window.py
:
width, height = self.window.get_size()
# For the width use the size of the vbox containing the tree and
# status combo, this will cancel out any hpaned width
width = self.xml.get_object('roster_vbox2').allocation.width
The width is first correctly determined to be "1920", but then overwritten with "236". I am inclined to just remove the second assignment to width; in principle, setting the window size to what it was should not need any cancelling of anything.
Secondly, gajim does not remember whether the window was maximized. This is relevant if the screen size changed since the last time gajim has been shown -- something which is very common e.g. on Laptops that are frequently used with an external screen, but also while traveling with the internal screen only.
Software versions
OS version: Debian testing
GTK version: 2.24.30