The --geometry switch doesn't work properly.
$ gpsdrive -M pda --geometry=320x240 &
$ xwininfo | grep -A1 'Width:'
Width: 610
Height: 659
$ gpsdrive -M pda --geometry=800x600 &
$ xwininfo | grep -A1 'Width:'
Width: 1090
Height: 1019
$ gpsdrive -M car --geometry=800x600 &
$ xwininfo | grep -A1 'Width:'
Width: 1280
Height: 1024
(actual screen dimentions)
$ gpsdrive --geometry=640x480 &
$ xwininfo | grep -A1 'Width:'
Width: 1366
Height: 1071
Hamish
Guenther wrote: (on the mailing list)
> ok, this needs some explanation:
>
> in car mode gpsdrive automatically maximizes its window, to make use
> of all the space available. it is not using fullscreen mode, so
> panels from the desktop-environment can still be used.
> this works perfectly for my use case, but if needed, this can also
> be separated.
Yes with defaults it fits as fullscreen-but-windowed for me in car mode.
But --geometry should override that default.
> in all the other modes the minimum size of the window is limited to
> the space all the widgets require. so if the values set for geometry
> are smaller than the required space, then the window will be bigger
> than set.
That covers the --geometry=320x240 case, but why then are 800x600 and 640x480 both bigger than 1000x1000?
Hamish
Guenther:
> sorry, I can't reproduce this, here it works as expected:
> 800x600 desktop --> 800x600
> 800x600 pda --> 800x600
> 640x480 desktop --> 674x579
> 640x480 pda --> 640x480
>
> the deviation in 640x480 pda mode comes from the needed space of
> the widgets,
ok, I'll have a look inside the debugger and see if I can figure out
why it is going funny on my machine.
> as already explained. this could be optimized a little bit if we allow
> to set, which elements are drawn and which are not, but it
> also depends on the settings of the current gtk theme...
One thing I find is that the space around the dashboard numbers is a bit
too large. Perhaps that just depends on the font size you use, my
font_bigtext is 26 (Sans bold) and there is still about 1cm around all
edges.
Hamish
Hi, I just added a gtk_window_get_size() + printf() call to gui.c.
starting gpsdrive with: gpsdrive --geometry=640x480
gtk_window_get_size() debug msg (and xwininfo) returns:
xsize=1499 ysize=1224 geometry=[640x480]
I see in the help that the parsing should happen after gtk_widget_show_all(), but then in the code example it is not. ???
http://library.gnome.org/devel/gtk/stable/GtkWindow.html#gtk-window-parse-geometry
something weird WRT the order of calls I guess..
Hamish