[Github-comments] [geany/geany] After restarting Geany in a maximized state, when unmaximizing, window is the wrong size (Issue #2976)

xiota notifications at xxxxx
Tue Nov 2 01:21:55 UTC 2021


@elextr When I change `keyfile.c` to not save size and position when maximized, the normal window size restores properly.  But the msgwin and sidebar don't.
```C
/* Save window size and position only when not maximized */
wstate = gdk_window_get_state(gtk_widget_get_window(main_widgets.window));
if (wstate & GDK_WINDOW_STATE_MAXIMIZED)
	ui_prefs.geometry[4] = 1;
else
{
	gtk_window_get_position(GTK_WINDOW(main_widgets.window), &ui_prefs.geometry[0], &ui_prefs.geometry[1]);
	gtk_window_get_size(GTK_WINDOW(main_widgets.window), &ui_prefs.geometry[2], &ui_prefs.geometry[3]);
	ui_prefs.geometry[4] = 0;
}
g_key_file_set_integer_list(config, PACKAGE, "geometry", ui_prefs.geometry, 5);
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2976#issuecomment-957016866
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211101/9f774890/attachment.htm>


More information about the Github-comments mailing list