Remember window size

This commit has gone through a few iterations and I trimmed it down to
what I consider the "conservative minimum" - so this only stores window
size, not window position. And in my mind that's the more relevant part,
anyway. Have your window manager position the window at a "smart" spot on
your screen...

Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com>
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Amit Chaudhuri 2013-02-12 13:03:23 +01:00 committed by Dirk Hohndel
parent cfdde3ff63
commit d742d7b391
5 changed files with 64 additions and 0 deletions

12
macos.c
View file

@ -45,6 +45,11 @@ void subsurface_set_conf_bool(char *name, int value)
value ? kCFBooleanTrue : kCFBooleanFalse, SUBSURFACE_PREFERENCES);
}
void subsurface_set_conf_int(char *name, int value)
{
/* CF pref stuff here? */
}
const void *subsurface_get_conf(char *name)
{
CFPropertyListRef strpref;
@ -65,6 +70,13 @@ int subsurface_get_conf_bool(char *name)
return boolpref;
}
int subsurface_get_conf_int(char *name)
{
return -1; /* CF pref stuff here? */
}
void subsurface_flush_conf(void)
{
int ok = CFPreferencesAppSynchronize(SUBSURFACE_PREFERENCES);