diff options
author | Søren Sandmann Pedersen <sandmann@redhat.com> | 2008-06-24 11:57:06 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <sandmann@redhat.com> | 2008-06-24 11:57:06 -0400 |
commit | 5e097eb4c24e6337f9efcc591c44682b5150deb2 (patch) | |
tree | 9a6b39e9eaab4493b3b78c9188a8c0fecf85d3c2 | |
parent | 02a89709e71384a4f6ef54bfd97eb2c4100d8136 (diff) |
Better default placement
-rw-r--r-- | siv.c | 3 | ||||
-rw-r--r-- | window.c | 12 |
2 files changed, 12 insertions, 3 deletions
@@ -80,7 +80,8 @@ app_show_could_not_open (GtkWidget *parent_window, } void -app_register_window (App *app, SivWindow *window) +app_register_window (App *app, + SivWindow *window) { ++app->n_windows; } @@ -912,8 +912,16 @@ set_defaults (SivWindow *window) } else { - width = monitor.width / 3; - height = (width * 4) / 3; + if (monitor.height < monitor.width) + { + height = (monitor.height * 3) / 4; + width = (3 * height) / 4; + } + else + { + width = (monitor.width) / 3; + height = (width * 4) / 3; + } } if (width > monitor.width) |