Commit 19dea7ae authored by Victor Ananjevsky's avatar Victor Ananjevsky

fix the fixed. keep user defined window size when --fixed option is used

parent ff817786
...@@ -350,6 +350,14 @@ create_layout (GtkWidget *dlg) ...@@ -350,6 +350,14 @@ create_layout (GtkWidget *dlg)
static void static void
realize_cb (GtkWidget *dlg, gpointer d) realize_cb (GtkWidget *dlg, gpointer d)
{ {
if (options.data.fixed)
{
gtk_widget_set_size_request (dlg, options.data.width, options.data.height);
gtk_window_set_resizable (GTK_WINDOW (dlg), !options.data.fixed);
}
else
{
gint cw, ch; gint cw, ch;
/* get current window size for gtk_window_resize */ /* get current window size for gtk_window_resize */
gtk_window_get_size (GTK_WINDOW (dlg), &cw, &ch); gtk_window_get_size (GTK_WINDOW (dlg), &cw, &ch);
...@@ -357,9 +365,8 @@ realize_cb (GtkWidget *dlg, gpointer d) ...@@ -357,9 +365,8 @@ realize_cb (GtkWidget *dlg, gpointer d)
options.data.width = cw; options.data.width = cw;
if (options.data.height == -1) if (options.data.height == -1)
options.data.height = ch; options.data.height = ch;
gtk_window_resize (GTK_WINDOW (dlg), options.data.width, options.data.height); gtk_window_resize (GTK_WINDOW (dlg), options.data.width, options.data.height);
gtk_window_set_resizable (GTK_WINDOW (dlg), !options.data.fixed); }
if (options.data.use_posx || options.data.use_posy) if (options.data.use_posx || options.data.use_posy)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment