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,16 +350,23 @@ create_layout (GtkWidget *dlg) ...@@ -350,16 +350,23 @@ create_layout (GtkWidget *dlg)
static void static void
realize_cb (GtkWidget *dlg, gpointer d) realize_cb (GtkWidget *dlg, gpointer d)
{ {
gint cw, ch;
/* get current window size for gtk_window_resize */ if (options.data.fixed)
gtk_window_get_size (GTK_WINDOW (dlg), &cw, &ch); {
if (options.data.width == -1) gtk_widget_set_size_request (dlg, options.data.width, options.data.height);
options.data.width = cw; gtk_window_set_resizable (GTK_WINDOW (dlg), !options.data.fixed);
if (options.data.height == -1) }
options.data.height = ch; else
{
gtk_window_resize (GTK_WINDOW (dlg), options.data.width, options.data.height); gint cw, ch;
gtk_window_set_resizable (GTK_WINDOW (dlg), !options.data.fixed); /* get current window size for gtk_window_resize */
gtk_window_get_size (GTK_WINDOW (dlg), &cw, &ch);
if (options.data.width == -1)
options.data.width = cw;
if (options.data.height == -1)
options.data.height = ch;
gtk_window_resize (GTK_WINDOW (dlg), options.data.width, options.data.height);
}
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